我已经build立了一个虚拟的debian机器,在我的windows系统上运行(使用VirtualBox)来开发LAMP堆栈。 今天,当我尝试从我的Windows机器加载一个开发网站的浏览器没有得到我的虚拟机的响应。 我不是一个Linuxpipe理员; 这是我可以告诉你的:
昨天我在虚拟机上做了一些工作来构buildphp imagick.so可执行文件,所以我可以使用一些pdf编辑库。 这些变化(最终)基本上是这样的:
在做出这些改变之前,我做了一个虚拟机的快照。 当我遇到这个问题时,我closures了修改后的虚拟机,启动了我之前的快照。 这没有区别 – 同样的Web服务器问题。
编辑:以root身份重新启动Apache后更新的问题
停止/启动服务器:
root@debian:/home/brd# /etc/init.d/apache2 stop Stopping web server: apache2 ... waiting . root@debian:/home/brd# /etc/init.d/apache2 start Starting web server: apache2.
Apache似乎重新启动没有投诉
root@debian:/home/brd# tail /var/log/apache2/error.log Failed loading /usr/lib/php5# ls 20090626+lfs/xdebug.so: /usr/lib/php5# ls 20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory Failed loading /usr/lib/php5# ls 20090626+lfs/xdebug.so: /usr/lib/php5# ls 20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory [Thu Mar 14 09:27:16 2013] [notice] caught SIGTERM, shutting down Failed loading /usr/lib/php5# ls 20090626+lfs/xdebug.so: /usr/lib/php5# ls 20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory [Thu Mar 14 09:27:22 2013] [error] python_init: Python version mismatch, expected '2.6.5+', found '2.6.6'. [Thu Mar 14 09:27:22 2013] [error] python_init: Python executable found '/usr/bin/python'. [Thu Mar 14 09:27:22 2013] [error] python_init: Python path being used '/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'. [Thu Mar 14 09:27:22 2013] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads. [Thu Mar 14 09:27:22 2013] [notice] mod_python: using mutex_directory /tmp [Thu Mar 14 09:27:22 2013] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze15 with Suhosin-Patch mod_python/3.3.1 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
xdebug错误似乎存在:
root@debian:/home/brd# ls /usr/lib/php5/20090626+lfs/ -al total 1836 drwxr-xr-x 2 root root 4096 Mar 13 15:29 . drwxr-xr-x 5 root root 4096 Mar 12 17:07 .. -rw-r--r-- 1 root root 866513 Mar 13 15:29 imagick.so -rw-r--r-- 1 root root 109220 Mar 4 09:23 mysqli.so -rw-r--r-- 1 root root 42352 Mar 4 09:23 mysql.so -rw-r--r-- 1 root root 26116 Mar 4 09:23 pdo_mysql.so -rw-r--r-- 1 root root 87588 Mar 4 09:23 pdo.so -rw-r--r-- 1 root root 141336 Aug 19 2010 suhosin.so -rw-r--r-- 1 root root 561230 Jul 8 2010 xdebug.so
Apache似乎正在运行..
root@debian:/home/brd# ps aux | grep apache root 2338 0.0 0.6 45448 12696 ? Ss 10:51 0:00 /usr/sbin/apache2 -k start www-data 2346 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start www-data 2347 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start www-data 2348 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start www-data 2349 0.0 0.3 45448 6540 ? S 10:51 0:00 /usr/sbin/apache2 -k start www-data 2350 0.0 0.3 45448 6536 ? S 10:51 0:00 /usr/sbin/apache2 -k start root 2358 0.0 0.0 3304 764 pts/0 S+ 10:52 0:00 grep apache
httpd监听端口80?
root@debian:/home/brd# ss -nal | grep 80 0 128 :::80 :::*
检查防火墙
root@debian:/home/brd# iptables -n -L -v Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
从/etc/apache2/ports.conf中听取指令(在/etc/apache2/apache2.conf中没有Listen指令)
NameVirtualHost *:80 Listen 80 <IfModule mod_ssl.c> # If you add NameVirtualHost *:443 here, you will also have to change # the VirtualHost statement in /etc/apache2/sites-available/default-ssl # to <VirtualHost *:443> # Server Name Indication for SSL named virtual hosts is currently not # supported by MSIE on Windows XP. Listen 443 </IfModule> <IfModule mod_gnutls.c> Listen 443 </IfModule>
但是..
我仍然无法从我的Windows机器ping端口80。 从这里,我不知道该去哪里。 build议?
在启动apache2时看一下这一行:
权限被拒绝:make_sock:无法绑定到
您需要具有root权限才能启动守护程序,该守护程序绑定到小于1024的端口号。
试试sudo /etc/init.d/apache2 start
您没有停止/启动您的Apache,因为您是以普通用户身份login的,或者在端口80上运行另一个Web服务器。