我在 Ubuntu 14.04 上安装了 Apache 2.4,并且按http://localhost/
地址运行正常。但是当我尝试添加一个新的虚拟主机时,例如http://bow.loc
并重新启动 apache,新地址http://bow.loc
在http://localhost
.
我的配置是:
<VirtualHost *:80>
ServerName www.bow.loc
ServerAlias bow.loc
DocumentRoot /var/www/html/bow/web
<Directory /var/www/html/bow>
AllowOverride All
Options FollowSymLinks MultiViews
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app.php [QSA,L]
</IfModule>
</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
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我怎样才能得到我的网站http://bow.loc
?
我想644
只对当前目录中的所有文件应用权限,只对当前目录755
中的子目录应用权限chmod