I need help
Posted by: primal (---.20-162-184.mc.videotron.ca)
Date: August 25, 2014 02:31AM

I really need some help, I have a little experience in setting up wamp 2.5 for LAN use but am lost when trying to set up for a WAN ( www ) ( Yes, I know this isn't recommended... I'm testing before hosting so everything works that gets uploaded to a hosting site and at times I'm not on my LAN to access it but on the web elsewhere which may be at various locations at times)

I purchased a domain name from godaddy, say www.q.com ( as example )

My ISP blocks port 80 so at godaddy I have it configured to forward to my IP address ( found from googling "what's my IP"( say 123.123.123.123 for example ) and port8080. ( 123.123.123.123:8080 )

I've port forwarded my router to listen on 8080 and redirect it to port 80 of the computer that the servers on.

I can access everything from my LAN, but not from the www.

I guess I'm asking....

How should my Vhosts file in windows be setup ?
How should my Vhosts file in apache ....httpd-vhosts be setup ?
How should my apache httpd.conf file be set up ?

Windows 7 ultimate
Wamp 2.5 with apache 2.4.9 , PHP 5.5.12 and MySQL 5.6.17

I've been trying for over a week now and nothing seems to work, I can access it locally , but not from the web.

Can someone please help me ??

Options: ReplyQuote
Re: I need help
Posted by: primal (---.20-162-184.mc.videotron.ca)
Date: August 25, 2014 02:44AM

excerpts From apache httpd.conf


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

should it be my router assigned ip for that pc followed by ":80:" ?




# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName q.com:80

HostnameLookups Off


should it be "www.q.com" ?

Hostname ... should it be on or off ? (if on "www.q.com" or just "q.com ? )

DocumentRoot "c:/wamp/www/"

# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
AllowOverride none
Require all denied
</Directory>

Should require all denied be changed to require all granted for the default directory ? ( I'm thinking no ...)

# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>

Options: ReplyQuote
Re: I need help
Posted by: primal (---.20-162-184.mc.videotron.ca)
Date: August 25, 2014 02:49AM

windows7 vhost file excerpt :

# localhost name resolution is handled within DNS itself.


127.0.0.1 q.com
127.0.0.1 localhost
::1 q.com
::1 localhost


green tray icon , windows7 ultimate 32 bit, wamp 32 bit 2.5

Options: ReplyQuote
Re: I need help
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 26, 2014 09:59AM

Your port forwarding sound good.


excerpts From apache httpd.conf


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

should it be my router assigned ip for that pc followed by ":80:" ?


NO DONT CHANGE THIS




# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName q.com:80

HostnameLookups Off


should it be "www.q.com" ?

Hostname ... should it be on or off ? (if on "www.q.com" or just "q.com ? )

DocumentRoot "c:/wamp/www/"

# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
AllowOverride none
Require all denied
</Directory>

Should require all denied be changed to require all granted for the default directory ? ( I'm thinking no ...)


NO DONT CHANGE ANY OF THIS



<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>


NOT NECESSARY IF YOU HAVE A VHOST Defined




windows7 vhost file excerpt :

# localhost name resolution is handled within DNS itself.


127.0.0.1 q.com
127.0.0.1 localhost
::1 q.com
::1 localhost


TOTALLY IRRELEVANT as the hosts file only effects the PC that this file lives on, but will allow access from this PC. Remember that when you move the site to its LIVE server, you need to remove all reference to q.com from the hosts file or you will not be able to access the REAL LIVE SITE.

============================================================

All you need to do is make a simple change to your httpd-vhost.conf to change the access rights to Apache for this one site, changing 'Require local and Require ip 192.168.xx' to :-


    Require all granted


That will allow just that Virtual Hosts to be accessed from the internet

Of course if your site is called www.q.com, then that is the Server name you should have for that Vhost as well otherwise apache will not be able to find it when connected to from the internet.


Post your httpd-vhost.conf (or Private Message me if you want to keep the domain name secret for now )

---------------------------------------------------------------------------------------------
(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


Sorry, only registered users may post in this forum.