apache /var/www/html/jsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsgsg

mitkmikd  于 10个月前  发布在  Apache
关注(0)|答案(2)|浏览(107)

嗨,我有这个错误,当我尝试从远程计算机访问以下路径:http://my_ip/redmine的数据。
我做了一个符号链接,从/opt/redmine/redmine-3.2.1到/var/www/html/redmine。
然后我这样配置apache 2配置:x1c 0d1x的数据
但我也不能访问。
然后我尝试激活FollowSymLinks到apache2.conf文件中,但仍然继续错误403。
最后,我发现我必须给予/opt/redmine/redmine-3.2.1访问权限,我用chmod o+x做了,但没有工作。
最后,我尝试给予根路径(/),但也不起作用。
有什么建议吗?
谢谢你的帮助伙伴。
答:对不起,我的英语太差了。

a9wyjsp7

a9wyjsp71#

如果你想访问http://your_ip/redmine,确保apache根目录指向/var/www/html,因为你的文件在/var/www/html/redmine。
您需要在/etc/apache 2/sites-available上配置000-default.conf文件,如下所示:

<VirtualHost *:80>
   ServerAdmin webmaster@localhost
   Options FollowSymLinks Indexes
   DocumentRoot /var/www/html
   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

字符串
然后尝试打开http://your_ip/redmine。如果仍然是错误403,在/etc/apache 2/sites-available中创建一个名为redmine.conf的文件,并像这样配置该文件:

<VirtualHost *:80>
   ServerAdmin webmaster@localhost
   ServerName redmine
   Options FollowSymLinks
   DocumentRoot /var/www/html/redmine
   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


然后chown -R www-data:www-data /var/www/html/redmine

h7wcgrx3

h7wcgrx32#

如果您的符号链接转到具有定义的权限并与用户关联的目录,例如:

/var/www/html/my_web -> /home/user_web

字符串
查看**/home/user_web**是否有执行权限,例如:

drwxr-xr-x user user /home/user_web

相关问题