1

我正在尝试在 DigitalOcean Debian droplet 上设置虚拟主机。通过这些设置,域将转到正确的位置。但是,我的网站中存在损坏的链接,当我尝试导航到 时http://ndunn.co.uk/icons,我收到 403 错误。似乎这会影响子目录,尽管我不能确定。有人能帮忙吗?

这就是它的内容/etc/apache2/sites-available/ndunn.co.uk

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName ndunn.co.uk
        ServerAlias www.ndunn.co.uk 
        DocumentRoot /var/www/ndunn.co.uk/public_html
        <Directory />
                Options FollowSymLinks
                AllowOverride None
                Allow from all
        </Directory>
        <Directory /var/www/ndunn.co.uk/public_html>
                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 None
                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 
</VirtualHost>
4

1 回答 1

0

尝试在此行添加双引号:

<Directory "/var/www/ndunn.co.uk/public_html">

更新:问题可能是您的配置文件的位置来自debian 的文档

sites-enabled 目录中的每个配置文件都会在服务器启动时加载 - 而 sites-available 中的文件会被完全忽略。

所以你应该把你的配置文件放在 /etc/apache2/sites-enabled/ndunn.co.uk

于 2014-03-02T23:01:19.287 回答