在Ubuntu上使用guest虚拟机,我修改了/etc/apache2/ports.conf来侦听端口8010。
启动mysql和apache2后,我去了http://localhost:8010/bugzilla ,但是我得到了一个404错误。
我认为我的ports.conf设置正确,因为我看到一个404错误, "The requested URL /bugzilla was not found on this server" ,在主机端口8010的本地主机上显示。
请检查我的ports.conf并给我build议。
ports.conf
NameVirtualHost *:8010 Listen 8010 #<VirtualHost *:8010> #DocumentRoot /bugzilla ServerName bugzilla ServerAdmin webmaster@localhost # Other directives here #</VirtualHost> <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>
你混淆了太多的概念:端口pipe理和DocumentRoot定义。
这里的Apache没有在你的实际DdocumentRoot中find目录bugzilla。 这不是港口的问题。
通常documentRoot在/ var / www中,那么bugzilla应该在这里; 关于你的实际configuration。
编辑 :
要pipe理CGI,您需要将其添加到您的httpd.conf中
<Directory /var/www/html/bugzilla/> AddHandler cgi-script .cgi Options +Indexes +ExecCGI DirectoryIndex index.cgi AllowOverride Limit </Directory>
更好的方法是做一个专门的虚拟主机,否则如果你崩溃你的Apacheconfiguration; 每一项服务都会下降。