我设置了一个流浪盒来将guest 80的端口转发给8080的主机,当我去主机8080时,我找不到404文件。根据{{3}}它似乎是一个符号链接问题,但我的sym链接设置正确:
vagrant@vagrant-ubuntu-trusty-64:/etc/apache2/sites-enabled$ ls -l
total 0
lrwxrwxrwx 1 vagrant vagrant 41 Apr 8 00:19 000-default.conf -> /etc/apache2/sites-available/default.conf
或者至少我很确定这是正确的。我的default.conf
看起来像这样:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/dirty_bird
# correct caching issue where edited images do not refresh http://www.mabishu.com/blog/2013/05/07/solving-caching-issues-with-vagrant-on-vboxsf/
EnableSendfile off
<Directory /var/www/dirty-bird>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/dirty-bird.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/dirty-bird.access.log combined
</VirtualHost>
当我vagrant up
然后访问localhost::8080
时,我得到:404 File Not Found
我确信这很简单,但我不确定是什么。谷歌主要告诉我它的符号链接问题,但除非我的符号链接错误,否则不是这种情况。并且apache正在运行。
答案 0 :(得分:-1)
在防火墙中打开端口8080?
在VirtualHost中查看端口80,更改为8080.
<VirtualHost *:80>
泰