7-09 1,347 views
sudo apt-get install apache2
重启服务
sudo /etc/init.d/apache2 restart
目录结构
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.116.81.86. Set the 'ServerName' directive globally to suppress this message
解决方法:编辑/etc/apache2/apache2.conf,在文件末尾加上
ServerName localhost
开启反向代理
开启 module
ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load
ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load
修改配置
<VirtualHost *:80>
ProxyPass / http://localhost:8888
ProxyPassReverse / http://localhost:8888
</VirtualHost>
启用PHP
sudo apt-get install libapache2-mod-php5