简体   繁体   中英

Setting up apache web server

Extreme noob question. I am trying to set up my apache web server. I bought a domain name from namecheap.com and have it directing to my servers IP address. I went through all the steps I believe to set up my apache server running with php. When I go to my domain name, I am at home and it is connected to the same wifi the server is, it goes to my webpage without a problem. My problem is that when I attempt to go to my domain name when I am not connected to the same wifi, I get 400 or 404 error messages. Would anyone know what I can do to fix this?

Thank you in advance!

EDIT:

Error Logs.

[Sat Jul 20 04:03:43 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations

[Sat Jul 20 04:03:43 2013] [notice] Server built: Jul 10 2013 01:52:12

[Sat Jul 20 04:03:43 2013] [notice] Parent: Created child process 2376

[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Child process is running

[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Acquired the start mutex.

[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Starting 64 worker threads.

[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Starting thread to listen on port 80. httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

[Sat Jul 20 04:05:37 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Jul 20 04:05:37 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations

[Sat Jul 20 04:05:37 2013] [notice] Server built: Jul 10 2013 01:52:12

[Sat Jul 20 04:05:37 2013] [notice] Parent: Created child process 1628

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Child process is running

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Acquired the start mutex.

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Starting 64 worker threads.

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Starting thread to listen on port 80.

[Sat Jul 20 04:22:20 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Jul 20 04:22:20 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations

[Sat Jul 20 04:22:20 2013] [notice] Server built: Jul 10 2013 01:52:12

[Sat Jul 20 04:22:20 2013] [notice] Parent: Created child process 1728

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Child process is running

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Acquired the start mutex.

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Starting 64 worker threads.

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Starting thread to listen on port 80.

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

[Sat Jul 20 04:26:09 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Jul 20 04:26:09 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations

[Sat Jul 20 04:26:09 2013] [notice] Server built: Jul 10 2013 01:52:12

[Sat Jul 20 04:26:10 2013] [notice] Parent: Created child process 1548

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Child process is running

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Acquired the start mutex.

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Starting 64 worker threads.

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Starting thread to listen on port 80.

If I'm understanding you correctly, your web server is running on a machine that is connected to your local network. If so, it sounds like your web server is probably not publicly accessible due to a firewall or network configuration.

If your Internet connection uses a dynamic IP address, you'll likely need to set up a dynamic DNS service to point your domain to your IP address. On your network, you might also need to configure port forwarding to forward port 80 traffic to the specific IP address of the server.

For more information, check out http://lifehacker.com/160945/ask-lifehacker--host-my-web-site-at-home

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM