Pages: Previous12
Current Page: 2 of 2
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: March 27, 2018 02:23PM

Ok,

So to make another VH that you can access from inside your network, but running the exact same code as the externally visible site, I would try something like this

--------Host File--------------
127.0.0.1 localhost
::1 localhost

127.0.0.1 opsuscredcap.ddns.net
::1 opsuscredcap.ddns.net

127.0.0.1 opsuscredcap.local
::1 opsuscredcap.local



And add another VH like this


# Virtual Hosts
#
<VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot "C:/Wamp/www"
    <Directory "C:/Wamp/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName opsuscredcap.ddns.net
    ServerAlias www.opsuscredcap.ddns.net
    DocumentRoot "C:/wamp/www/redcap"
    <Directory "C:/wamp/www/redcap/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName opsuscredcap.local
    ServerAlias www.opsuscredcap.local
    DocumentRoot "C:/wamp/www/redcap"
    <Directory "C:/wamp/www/redcap/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

Note the new VH is visible only internally `Require local`
and it uses the new `opsuscredcap.local` domain name
But it points to exactly that same DocumentRoot as the externally visible site.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 09, 2018 02:51PM

Hi I'm new to the forum, I installed wamp64 and I made the changes exactly as you mentioned above in the post to publish my site on the internet, but when I call the site from the internet I'm given the error 403 message you do not have the permess, you can suggest me a solution to the problem, thanks in advance

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 09, 2018 05:23PM

Hi,

Can you show us the full error message and also your Virtual Host definition please

Also answer these question READ (and answer) BEFORE YOU ASK A QUESTION

It would also be a good idea to start a brand new thread.

Did you Port Forward your router?
Did you check your Firewall allows remote TCP connection through.

Thanks

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 10, 2018 08:54AM

Hi,
thank you for your replay, the PC is Windows 10 64bit, Wamp 3.1.2 64bit, Apache 2.4.23, PHP 7.0.10, MySQL 5.7.14, Wamp is Green
the virtual Host definition in the httpd-vhosts.conf file are:

# Virtual Hosts
#

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot c:/wamp64/www
	<Directory  "c:/wamp64/www/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>
#
#
<VirtualHost *:80>
	ServerName calossografica.ddns.net
	ServerAlias www.calossografica.ddns.net
	DocumentRoot "c:/wamp64/www/calossografica"
	<Directory  "c:/wamp64/www/calossografica/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>

The definition in Hosts file are:


127.0.0.1 localhost
::1 localhost

127.0.0.1	calossografica.ddns.net
::1	calossografica.ddns.net

The error that is reported to me when I try to access the internet is "Access Denied You don't have permission to access "[calossografica.ddns.net]; on this server".

The port 80 are open on the router and on the firewall
Thanks in advance



Edited 1 time(s). Last edit at 04/10/2018 11:02AM by RiggsFolly.

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 10, 2018 11:07AM

Hi,

Well I can see your web site so I assume you have fixed the access issue.

All that remains to be done is to fix the references to `localhost` in you source code.

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 10, 2018 12:16PM

Hi,

I've changed in httpd.conf the lines

from
<Directory />
AllowOverride none
Require all granted
</Directory>

to
<Directory />
AllowOverride all
Require all granted
</Directory>

but for "fix the references to `localhost`" are you referring to my website or to wamp setup?
Thanks

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 10, 2018 02:22PM

Hi

That is a very VERY dangerous change, and opens access to all the drive that Apache is installed on.

A REAL SECURITY NO NO!

Replace the original setting

<Directory />
    AllowOverride none
    Require all denied
</Directory>

Try removing the

[code[
ServerAlias www.calossografica.ddns.net
[/code]

from the VH definition

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 04/10/2018 02:25PM by RiggsFolly.

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 10, 2018 04:00PM

I've restored the AllowOverride with none and I've removed ServerAlias www.calossografica.ddns.net now in Internet I've error 403 Forbidden.

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 11, 2018 11:27AM

You are getting an Apache Error (403) so we can assume you are getting through your router and the port forwarding is correct.

I made some minor mods, so try copy/paste this to `httpd-vhosts.conf` file


# Virtual Hosts
#

<VirtualHost *:80>
	ServerName localhost
	DocumentRoot c:/wamp64/www
	<Directory  "c:/wamp64/www/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		# Never make locahost accessible
		Require local
	</Directory>
</VirtualHost>
#
#
<VirtualHost *:80>
	ServerName calossografica.ddns.net
	ServerAlias www.calossografica.ddns.net
	DocumentRoot c:/wamp64/www/calossografica
	<Directory  "c:/wamp64/www/calossografica/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>


The definition in Hosts file are only relevant to your PC, they do not effect access from the internet

127.0.0.1 localhost
::1 localhost

127.0.0.1	calossografica.ddns.net
::1	calossografica.ddns.net


Now this makes me think that you may have changed something in the `httpd.conf` file. Did you?

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 11, 2018 12:08PM

I copied in VH what you posted to me but still gives me error 403 when I try to access from the internet

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 11, 2018 02:06PM

So my last question was have you made any changes to the `httpd.conf` file?

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 11, 2018 04:56PM

These are the parameters of my httpd.conf:

#Listen 12.34.56.78:80
Listen 0.0.0.0:80
Listen [::0]:80

#
ServerName 10.0.0.11:80

#
<Directory />
AllowOverride none
Require all granted
</Directory>

#
HostnameLookups Off

# onlineoffline tag - don't remove
Require all granted

that's all

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 11, 2018 05:42PM

Ok,

Change

ServerName 10.0.0.11:80

To

ServerName localhost:80

And

#   onlineoffline tag - don't remove
    Require local

as all access is not controlled from your httpd-vhosts.conf now

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 11, 2018 06:13PM

I change what you posted to me but still gives me error 403 when I try to access from the internet

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 11, 2018 06:20PM

Hi

Can you make the site available and I will try and get to it from here

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 12, 2018 08:42AM

how should i do?
the site address is calossografica.ddns.net
test

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: April 12, 2018 09:46AM

Thanks,

I can see the site!

There are issues with the layout, but thats a code issue.

So I assume when yo try and access from the internet, you are doing that from inside your local network. That often does not work as most SOHO routers do not have the piece of code that allows them to notice the site is in fact inside the local network.

Try accessing the site from your phone, but make sure it is not using WIFI and you shoudl see it too

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: petrigno (---.cust.vodafonedsl.it)
Date: April 12, 2018 12:16PM

is true I tried to access from a PC on the same network now I see the site from my iphone I can not see the pictures but I think I know why now I try to solve it anyway many thanks for your help

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: selimica (---.reverse.superonline.net)
Date: May 15, 2018 10:40AM

Hi RiggsFolly,

I have read so many articles on how to configure wamp or apache and could not make it work for external access.

At last, By reading your posts I configured my wamp server for external users and it's working great. I just signed up to thank you.

Have a great day

Options: ReplyQuote
Re: How to make WAMPServer accessible on the internet
Posted by: RiggsFolly (Moderator)
Date: May 15, 2018 11:03AM

Hi,

Glad it was of use to you.

And thanks for taking the time to say thanks smiling smiley

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Pages: Previous12
Current Page: 2 of 2


Sorry, only registered users may post in this forum.