简体   繁体   English

设置Apache Web服务器

[英]Setting up apache web server

Extreme noob question. 极端的菜鸟问题。 I am trying to set up my apache web server. 我正在尝试设置我的Apache Web服务器。 I bought a domain name from namecheap.com and have it directing to my servers IP address. 我从namecheap.com购买了一个域名,并将其定向到我的服务器IP地址。 I went through all the steps I believe to set up my apache server running with php. 我经历了所有我认为要设置使用php运行的apache服务器的步骤。 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. 当我转到域名时,我在家里,并且连接到服务器所在的wifi,它可以毫无问题地转到我的网页。 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. 我的问题是,当我未连接至同一WiFi时尝试访问域名时,会收到400或404错误消息。 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 [2013年7月20日星期六04:03:43] [注意]已配置Apache / 2.2.25(Win32)PHP / 5.2.17-恢复正常操作

[Sat Jul 20 04:03:43 2013] [notice] Server built: Jul 10 2013 01:52:12 [2013年7月20日星期六04:03:43] [通知]服务器建成:2013年7月10日01:52:12

[Sat Jul 20 04:03:43 2013] [notice] Parent: Created child process 2376 [2013年7月20日星期六04:03:43] [注意]父项:已创建子进程2376

[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Child process is running [2013年7月20日星期六04:03:43] [注意]子级2376:子进程正在运行

[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Acquired the start mutex. [2013年7月20日,星期六,04:03:43] [注意]孩子2376:获取了启动互斥量。

[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Starting 64 worker threads. [2013年7月20日星期六,04:03:43] [注意]子级2376:启动了64个工作线程。

[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 [2013年7月20日星期六,04:03:43] [注意]子级2376:启动线程以侦听端口80。httpd.exe:使用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? [2013年7月20日星期六:: 04:05:37] [警告] pid文件C:/webdevs/apache/logs/httpd.pid被覆盖-不干净的关机是否关闭了以前的Apache运行?

[Sat Jul 20 04:05:37 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations [2013年7月20日星期六04:05:37] [注意]已配置Apache / 2.2.25(Win32)PHP / 5.2.17-恢复正常运行

[Sat Jul 20 04:05:37 2013] [notice] Server built: Jul 10 2013 01:52:12 [2013年7月20日星期六04:05:37] [通知]服务器建成:2013年7月10日01:52:12

[Sat Jul 20 04:05:37 2013] [notice] Parent: Created child process 1628 [2013年7月20日星期六04:05:37] [注意]父项:创建的子进程1628

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName httpd.exe:无法可靠地确定服务器的标准域名,对于ServerName使用127.0.0.1

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName httpd.exe:无法可靠地确定服务器的标准域名,对于ServerName使用127.0.0.1

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Child process is running [2013年7月20日星期六04:05:37] [通知]子进程1628:子进程正在运行

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Acquired the start mutex. [2013年7月20日,星期六,04:05:37] [注意]儿童1628:获取了启动互斥体。

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Starting 64 worker threads. [2013年7月20日星期六,04:05:37] [注意]子级1628:启动了64个工作线程。

[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Starting thread to listen on port 80. [2013年7月20日星期六,04:05:37] [注意]子级1628:启动线程以监听端口80。

[Sat Jul 20 04:22:20 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [2013年7月20日星期六04:22:20] [警告] pid文件C:/webdevs/apache/logs/httpd.pid被覆盖-不干净地关闭了以前的Apache运行?

[Sat Jul 20 04:22:20 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations [2013年7月20日星期六04:22:20] [注意]已配置Apache / 2.2.25(Win32)PHP / 5.2.17-恢复正常运行

[Sat Jul 20 04:22:20 2013] [notice] Server built: Jul 10 2013 01:52:12 [2013年7月20日星期六04:22:20] [通知]服务器建成:2013年7月10日01:52:12

[Sat Jul 20 04:22:20 2013] [notice] Parent: Created child process 1728 [2013年7月20日星期六04:22:20] [注意]父项:创建的子进程1728

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Child process is running [2013年7月20日星期六04:22:22] [通知]子进程1728:子进程正在运行

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Acquired the start mutex. [2013年7月20日星期六04:22:22] [注意]儿童1728:获取了启动互斥量。

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Starting 64 worker threads. [2013年7月20日星期六,04:22:22] [注意]子1728:启动64个工作线程。

[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Starting thread to listen on port 80. [2013年7月20日星期六,04:22:22] [注意]子1728:启动线程以监听端口80。

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName httpd.exe:无法可靠地确定服务器的标准域名,对于ServerName使用127.0.0.1

[Sat Jul 20 04:26:09 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [2013年7月20日星期六,04:26:09] [警告] pid文件C:/webdevs/apache/logs/httpd.pid被覆盖-以前的Apache运行不正常关机?

[Sat Jul 20 04:26:09 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations [2013年7月20日星期六04:26:09] [通知]已配置Apache / 2.2.25(Win32)PHP / 5.2.17-恢复正常操作

[Sat Jul 20 04:26:09 2013] [notice] Server built: Jul 10 2013 01:52:12 [2013年7月20日星期六04:26:09] [通知]服务器建成:2013年7月10日01:52:12

[Sat Jul 20 04:26:10 2013] [notice] Parent: Created child process 1548 [2013年7月20日星期六04:26:10] [通知]父级:创建子进程1548

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName httpd.exe:无法可靠地确定服务器的标准域名,对于ServerName使用127.0.0.1

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Child process is running [2013年7月20日星期六04:26:10] [通知]子级1548:子进程正在运行

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Acquired the start mutex. [2013年7月20日,星期六,04:26:10] [注意]儿童1548:获取了启动互斥量。

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Starting 64 worker threads. [2013年7月20日,星期六,04:26:10] [注意]子级1548:启动了64个工作线程。

[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Starting thread to listen on port 80. [2013年7月20日星期六,04:26:10] [注意]子级1548:启动线程以监听端口80。

If I'm understanding you correctly, your web server is running on a machine that is connected to your local network. 如果我对您的理解正确,则您的Web服务器正在连接到本地网络的计算机上运行。 If so, it sounds like your web server is probably not publicly accessible due to a firewall or network configuration. 如果是这样,听起来您的Web服务器可能由于防火墙或网络配置而无法公开访问。

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. 如果您的Internet连接使用动态IP地址,则可能需要设置动态DNS服务,以将您的域指向您的IP地址。 On your network, you might also need to configure port forwarding to forward port 80 traffic to the specific IP address of the server. 在网络上,您可能还需要配置端口转发,以将端口80流量转发到服务器的特定IP地址。

For more information, check out http://lifehacker.com/160945/ask-lifehacker--host-my-web-site-at-home 有关更多信息,请访问http://lifehacker.com/160945/ask-lifehacker--host-my-web-site-at-home

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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