我是Apache的新手,当我将apache从2.2.22更新到2.4.6时,我发现默认的虚拟主机位置我将把我的mod_rewrite设置改变了.
对于apache2.2.22:它位于/ etc/apache2/sites_enabled/default中.对于apache 2.4.6,它已更改,帮助文档也说:"NameVirtualHost directiveAsAs":不再需要,现在已弃用.
我注意到似乎已从apache.conf中删除了该设置.以下是Apache 2.2.22和2.4.6的配置详细信息.
任何人都能告诉我在配置中需要更改的内容吗?
对于apache2.2.22:/ etc/apache2/sites_enabled/default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride all
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options …Run Code Online (Sandbox Code Playgroud)