Modify Virtual hosts to be accessed by anyone?
Posted by: TheStyne (---.home.cgocable.net)
Date: December 01, 2019 06:16PM

Hello all, glad to be on this forum,

I've been using WAMP to develop my site for quite some time now, but would like to experiment with making this site accessible by anyone. I'm very new to this, but I'll try my best not to be brutal to deal with smiling smiley

How would I go about doing this. I currently have my vhosts-conf file(see below) set up with my domain, and when editing the site I view it by visiting my link(lesboizs.club), however, I can only see it on my local machine, nothing else. How would I go about making it view-able from say, my phone? I have tried changing 'require local' to 'require all granted', but still nothing after a DNS service restart.

Thanks, Alex.


# Virtual Hosts
#
#"Listen 80' is commented because Apache wouldn't start if it wasn't commented. Kept logging errors.
#Listen 80
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

#
<VirtualHost *:80>
	ServerName lesboizs.club
	ServerAlias www.lesboizs.club
	DocumentRoot "c:/wamp64/www/les-boizs"
	<Directory  "c:/wamp64/www/les-boizs/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>



Edited 1 time(s). Last edit at 12/02/2019 11:54AM by RiggsFolly.

Options: ReplyQuote
Re: Modify Virtual hosts to be accessed by anyone?
Posted by: RiggsFolly (Moderator)
Date: December 02, 2019 11:57AM

Hi,

Lets start by asking what you actually want to do. Do you just want to be able to view it for development and testing purposes on you phone while inside your routers network, OR, do you want to be able to let people on the internet see this site?

Small Warning Opening up you site on the internest can be dangerous for those not fully aware of the consequences and the mechanisms required to secure a site.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Modify Virtual hosts to be accessed by anyone?
Posted by: Otomatic (Moderator)
Date: December 02, 2019 12:51PM

Hi,

> #"Listen 80' is commented because Apache wouldn't start if it wasn't commented. Kept logging errors.
> #Listen 80
This does not exist originally with Wampserver 3.

Listen 0.0.0.0.:80 exists in httpd.conf and does not need to be repeated elsewhere.

And what does the Apache documentation say about the Listen directive?
Multiple Listen directives for the same ip address and port will result in an Address already in use error message.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Modify Virtual hosts to be accessed by anyone?
Posted by: TheStyne (199.235.194.---)
Date: December 02, 2019 07:57PM

RiggsFolly Wrote:
-------------------------------------------------------
> Hi,
>
> Lets start by asking what you actually want to do.
> Do you just want to be able to view it for
> development and testing purposes on you phone
> while inside your routers network, OR, do you want
> to be able to let people on the internet see this
> site?
>
> Small Warning Opening up you site on the
> internest can be dangerous for those not fully
> aware of the consequences and the mechanisms
> required to secure a site.



I would like to open the site up to the broader network, for testing purposes. I don't intend to keep it up for very long, so I'm not concerned about the security. I should also mention that I've already setup and tested the port forwarding. I just want to know what I would have to change in order to get the site online




Otomatic Wrote:
-------------------------------------------------------
> Hi,
>
> > #"Listen 80' is commented because Apache
> wouldn't start if it wasn't commented. Kept
> logging errors.
> > #Listen 80
> This does not exist originally with Wampserver 3.
>
> Listen 0.0.0.0.:80 exists in httpd.conf and does
> not need to be repeated elsewhere.
>
> And what does the Apache documentation say about
> the Listen directive?
> Multiple Listen directives for the same ip
> address and port will result in an Address already
> in use error message.


I read that in the Apache documentation, and I didn't put the "Listen 80" there, WAMPserver did when I added the virtual host. I thought it shouldn't be there, but I just commented it out since WAMP put it there for whatever reason. I also thought I should let you know I'm using WAMPserver 3.1.9

Options: ReplyQuote
Re: Modify Virtual hosts to be accessed by anyone?
Posted by: RiggsFolly (Moderator)
Date: December 03, 2019 10:19AM

Well as you have added `Require all granted` to the VH in question, and port forwarded your router, all you need to do is set the DNS record for `lesboizs.club` to point to yout routers WAN IP Address.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Modify Virtual hosts to be accessed by anyone?
Posted by: TheStyne (---.home.cgocable.net)
Date: December 04, 2019 10:55PM

RiggsFolly Wrote:
-------------------------------------------------------
> Well as you have added `Require all granted` to
> the VH in question, and port forwarded your
> router, all you need to do is set the DNS record
> for `lesboizs.club` to point to yout routers WAN
> IP Address.


Done. I already set up the DNS records for different server software a long time ago using the same domain, and just verified it is indeed working, but I still can't access the site. Is there something I'm missing here? As far as I can tell I've done everything the way I'm supposed to, but still no luck

Thanks for all the help everyone by the way, I really appreciate it.

Options: ReplyQuote
Re: Modify Virtual hosts to be accessed by anyone?
Posted by: RiggsFolly (Moderator)
Date: December 04, 2019 11:05PM

Did you check your firewall is not blocking access.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Modify Virtual hosts to be accessed by anyone?
Posted by: TheStyne (---.home.cgocable.net)
Date: December 09, 2019 03:06AM

RiggsFolly Wrote:
-------------------------------------------------------
> Did you check your firewall is not blocking
> access.


That was the ticket! Somehow I didn't even think to try that. Thank you very much for your help, and thanks to Otomatic as well for his help. If I need anything else, I'll come back, and I might just stick around to see if I can help anyone else out.

Options: ReplyQuote


Sorry, only registered users may post in this forum.