help setting up my domain so it can be seen to www
Posted by: pitties4 (---.dsl.spfdil.ameritech.net)
Date: December 19, 2016 07:47PM

site was working with Abyss X1, switched over to Apache 2.4.23 to make WordPress and phpAdmin work.  Now I cannot get to my domain. I loaded all files to 'www' directory and created an alias for the domain. I'm very green to hosting my own site, but learn quickly. All services are running and icon is green. Please help and try to be easy on me.



Edited 1 time(s). Last edit at 12/19/2016 11:44PM by pitties4.

Options: ReplyQuote
Re: help setting up my domain so it can be seen to www
Posted by: RiggsFolly (Moderator)
Date: December 20, 2016 12:13AM

Hi

Please READ (and answer) BEFORE YOU ASK A QUESTION

---------------------------------------------------------------------------------------------
(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: help setting up my domain so it can be seen to www
Posted by: pitties4 (---.dsl.spfdil.ameritech.net)
Date: December 20, 2016 01:56AM

I thought I had everything right, could you check my work please?

# Virtual Hosts
#

<VirtualHost *:8000>
ServerName localhost
ServerAlias localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:8000>
DocumentRoot "c:/wamp/www/getolife
ServerName getolife.org
<Directory "c:/wamp/www/getolife">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#

Host:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
70.226.196.37 ns1.dnsExit.com
70.226.196.37 ns2.dnsExit.com
70.226.196.37 ns3.dnsExit.com
70.226.196.37 ns4.dnsExit.com


# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

127.0.0.1 localhost
127.0.0.1 getolife.org

:: localhost
:: getolife.org
#127.0.0.1 mewebmail.localhost



Edited 1 time(s). Last edit at 12/20/2016 01:58AM by pitties4.

Options: ReplyQuote
Re: help setting up my domain so it can be seen to www
Posted by: pitties4 (---.dsl.spfdil.ameritech.net)
Date: December 20, 2016 02:10AM

1 - Windows 10 Home - Build 14986
2 - WampServer 3.0.6 32 bit)
3 - Apache Version 2.4.23
4 - PHP Version 5.6.25
5 - MySQL Version5.7.14

Sorry. knew that.

I know I'm doing something wrong...is there a step by step to config like the one you gave me or a pre-config mod I could run with fill in the blanks?



Edited 1 time(s). Last edit at 12/20/2016 09:35AM by pitties4.

Options: ReplyQuote
Re: help setting up my domain so it can be seen to www
Posted by: RiggsFolly (Moderator)
Date: December 20, 2016 10:08AM

There are 13 question but only 5 answers

What are you attempting to do here. Are you trying to host this site on the internet or just locally for development?

---------------------------------------------------------------------------------------------
(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: help setting up my domain so it can be seen to www
Posted by: pitties4 (---.dsl.spfdil.ameritech.net)
Date: December 20, 2016 11:39AM

host if possible

Options: ReplyQuote
Re: help setting up my domain so it can be seen to www
Posted by: RiggsFolly (Moderator)
Date: December 20, 2016 12:42PM

Have you port forwarded your router?

Do you realise that a Windows Desktop OS will not host a website that is popular because a desktop OS has a limit to the number of external connections that can be active at any one time ( around 30 max ).

Do you understand the risks of hosting a web site?
Hackers will find you in minutes.
Are you prepared to harden your defences against this?
Do you have the skills to do this?

---------------------------------------------------------------------------------------------
(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: help setting up my domain so it can be seen to www
Posted by: pitties4 (---.dsl.spfdil.ameritech.net)
Date: December 20, 2016 01:04PM

Port forwarding is on and it was working when I was using Abyss X1. The reason I switched over to Wamp package is so my wife could run WordPress on her site.

I know I'm being a pain, Thanks for your patients!

1 - Windows version used: Windows 10 Home Build 14986 64 bit
2 - Version WampServer 32 bit
3 - Apache Version: 2.4.23
4 - PHP Version 5.6.25
5 - MySQL Version5.7.14
6 - What color is the WampServer icon: green


7 - In the file c:\Windows\System32\drivers\etc\hosts, what are the active lines with the name [localhost] in them?
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
70.226.196.37 ns1.dnsExit.com
70.226.196.37 ns2.dnsExit.com
70.226.196.37 ns3.dnsExit.com
70.226.196.37 ns4.dnsExit.com


# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

127.0.0.1 localhost
127.0.0.1 getolife.org

:: localhost
:: getolife.org
#127.0.0.1 mewebmail.localhost




8 - Do you have access to localhost? yes
9 - Do you have access to phpMyAdmin? yes

10 - If you refer to an error message, please include the EXACT wording of the error in your post:

Forbidden - You don't have permission to access /on this server

11 - If you use an Antivirus and / or Firewall, please include the names of these:

Windows firewall

12 - What is the full path to the installation of WampServer C:\wamp64\

13 - If you have one or more Virtual Hosts defined, please show their definition(s)
# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName getolife.org
DocumentRoot c:/wamp64/www/getolife
<Directory "c:/wamp64/www/getolife">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#

Options: ReplyQuote
Re: help setting up my domain so it can be seen to www
Posted by: pitties4 (---.dsl.spfdil.ameritech.net)
Date: December 20, 2016 01:47PM

I guess here's my question:

I'm also running "DNSExit IP Updater" from DNSExit, it updates my local and Remote IP for getolife.org. how do I have Apache listen for the IP address the updater uses...usually 192.168.137.1 and 10.0.0.2 for local and the Remote IP can change depending on AT&T but is usually 70.226.193.212.

Options: ReplyQuote
Re: help setting up my domain so it can be seen to www
Posted by: RiggsFolly (Moderator)
Date: December 20, 2016 02:50PM

I am not familiar with DNSExit specifically, but I have used similiar products, and I think you are missing the point a bit.

The DNSExit bit (the updater) should be running all the time on a PC inside your network.
Its job is to tell DNSExit what the current WAN IP address allocated of your router is. And thats it.

So assuming that is working correctly.

1. User enters your domain name in a browser.
2. Browser does a DNS lookup to find the IP address associated with the domain name.
3. Browser fires a request for a page at that IP address.

4. The router see's an access attempt on port 80, that it cannot match to a request that came from inside your router (NAT)

5. If port forwarding is set up in the router for external accesses on port 80, it forwards this external request to the internal IP address (the PC running WAMPServer[Apache]) mentioned on the forwarding instruction.

6. WAMPServer[Apache] recieves the page request and deals with it accordingly i.e. serves that page and runs any PHP code that exists inside it. Then it returns the page to the calling IP address

So Apache see's only a request like any other. So all it does is listen on port 80 the same way it would in any other situation.

Because you have used <VirtualHost *:80> the * says listen on any available ip address so you are covered. you dont need to specify a specific IP Address it will see any/all available ip addresses that exist on the PC its runnning on.

Now Apache looks at the domain name and tries to match it to one of its Virtual Hosts domain names i.e. `ServerName getolife.org`

When it find a match it starts serving from that Virtual Server using the DocumentRoot parameter to find the right folder.



BUT Apache has a security concept built into it. By default it is only allowed to accept connections from the PC running WAMPServer. This is specified in each Virtual Host using the `Require local` directive.


If you want to allow EXTERNAL access to ONE or MORE of your Virtual Hosts you have to change this directive to let Apache know.

So for the sites you want to serve to ANYBODY on the internet you have to change this directive accordingly

`Require all Granted` would allow anybody access to a site.

So change

<VirtualHost *:80>
ServerName getolife.org
DocumentRoot c:/wamp64/www/getolife
<Directory "c:/wamp64/www/getolife">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

To

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

I also added a `ServerAlias www.getolife.org` so if the users enters `www.getolife.org` or `getolife.org` they would be allowed in.

---------------------------------------------------------------------------------------------
(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: help setting up my domain so it can be seen to www
Posted by: pitties4 (---.dsl.spfdil.ameritech.net)
Date: December 20, 2016 03:08PM

Thank-you, Thank-you, Thank-you!!! I knew that there was something small I was missing.

Consider this problem solved!

Options: ReplyQuote


Sorry, only registered users may post in this forum.