为什么没有在 apache2 网络服务器中添加目录?
Why directory is not getting added inside apache2 web server?
我的 apache2 站点配置为我能够看到我在里面写的内容 index.html:
现在我想添加目录结构,所以在 conf 文件中我做了如下更改:
<VirtualHost *:80>
ServerAdmin info@crap.com
ServerName share.com
ServerAlias www.crap.com
DocumentRoot /var/www/crap.com/public_html
Alias /vagrant /home/vagrant/services
<Directory "/home/vagrant/services">
Options None
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
但是在网络服务器上我没有看到任何目录结构出现。
所以,请建议为什么我不能在页面上添加目录结构,如何解决?
当我尝试访问 192.168.10.10/vagrant 时,我得到了关注 window:
以下是 ls -l 的结果:
使用apache的这个配置。希望一切顺利。
<VirtualHost *:80>
ServerAdmin info@crap.com
ServerName share.com
ServerAlias www.crap.com
DocumentRoot /var/www/crap.com/public_html
Alias /vagrant /home/vagrant/services
<Directory "/home/vagrant/services">
Require all granted
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
我的 apache2 站点配置为我能够看到我在里面写的内容 index.html:
现在我想添加目录结构,所以在 conf 文件中我做了如下更改:
<VirtualHost *:80>
ServerAdmin info@crap.com
ServerName share.com
ServerAlias www.crap.com
DocumentRoot /var/www/crap.com/public_html
Alias /vagrant /home/vagrant/services
<Directory "/home/vagrant/services">
Options None
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
但是在网络服务器上我没有看到任何目录结构出现。 所以,请建议为什么我不能在页面上添加目录结构,如何解决? 当我尝试访问 192.168.10.10/vagrant 时,我得到了关注 window:
以下是 ls -l 的结果:
使用apache的这个配置。希望一切顺利。
<VirtualHost *:80>
ServerAdmin info@crap.com
ServerName share.com
ServerAlias www.crap.com
DocumentRoot /var/www/crap.com/public_html
Alias /vagrant /home/vagrant/services
<Directory "/home/vagrant/services">
Require all granted
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>