你好,我的 sites-enabled 文件夹下有一个文件 geometrixxig.com.conf。启用该文件后,我重新加载了 apache 服务。我使用了以下命令:
sudo a2ensite geometrixxig.com
以下是我的配置文件:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName geometrixxig.com
ServerAlias www.geometrixxig.com
DocumentRoot "/opt/communique/dispatcher/cache/content/geometrixx"
RewriteEngine On
RewriteRule ^/$ /content/geometrixx/en.html [PT,L]
RewriteCond %{REQUEST_URI} !^/apps
RewriteCond %{REQUEST_URI} !^/content
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/home
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/tmp
RewriteCond %{REQUEST_URI} !^/var
RewriteRule ^/(.*)$ /content/geometrixx/en/$1 [PT]
<Directory "/opt/communique/dispatcher/cache/content/geometrixx">
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
当我打http://geometrixxig.com/我收到一个错误:You don't have permission to access /content/geometrixx/en.html on this server.
我已经检查过权限都是 777,但不明白为什么它不起作用。
如果我打http://localhost/content/geometrixx/en.html我得到了页面
谢谢
答案1
您是否尝试过以递归方式更改所有权?
chown -R www-data:www-data /opt/communique/dispatcher/cache/content/geometrixx