我有一个/media/ramesh/Backend分区。我在这个分区中创建了一个文件夹,并添加了一个虚拟主机,如下所示:
步骤1:我通过这个代码sudo nano /etc/apache2/sites-available/reform.lan.conf创建了一个conf文件
第二步:里面的代码-
ServerAdmin webmaster@reform
ServerName reform.lan
ServerAlias www.reform.lan
DocumentRoot /media/ramesh/Backend/reform
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined第3步:通过sudo a2ensite reform.lan.conf启用站点
但是当我使用http://reform.lan/的时候
You don't have permission to access / on this server. error. 我不能触发窃听器。
发布于 2018-11-02 09:38:30
您必须按以下方式更改/media/ramesh/Backend/reform的所有者:
sudo chown -R www-data:www-data /media/ramesh/Backend/reformhttps://askubuntu.com/questions/1089428
复制相似问题