2014-02-19 25 views
0

拒絕我使用Ubunto.When我瀏覽我的本地主機我想看看我的共享目錄命名的Myproj權限。現在,當我瀏覽它,這是消息我收到:固定在我的本地

Forbidden

You don't have permission to access/on this server.

我想:

1)發放的允許任何人在這個目錄上,改變了所有人對我目前的用戶 2)改變了我的conf設置如下:

誰能幫助我解決這個?

我的conf設置是如下:

<VirtualHost *:80> 
    ServerAdmin [email protected] 

DocumentRoot /etc/apache2/sites-available/myproj 
<Directory /myproj> 
    Options FollowSymLinks 
    AllowOverride All 
</Directory> 

<Directory /etc/apache2/sites-available/myproj> 
    Options -Indexes FollowSymLinks MultiViews 
    AllowOverride All 
    Order allow,deny 
    deny None 
    allow from all 
</Directory> 

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 
<Directory "/usr/lib/cgi-bin"> 
    AllowOverride All 
    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 combined 

+0

你能提供的尾巴'輸出-n 20 /無功/日誌/的Apache2/error.log'將是有益的,你必須在你的配置語法錯誤,它可能是權限有關。 – nesreka

+0

@nesreka:我檢查了路徑,有2名爲error.log中和error.log.1這是error.log.1目錄索引由Options指令禁止輸出錯誤日誌:在/ var/WWW/ [星期二二月18 12點22分01秒2014] [錯誤] [客戶端127.0.0.1]指南索引由Options指令禁止:/無功/網絡/ – user3323774

+0

嘗試更換<目錄/的Myproj>到<目錄/ etc/apache2的/位點可用/ myproj>並看看你的機器上的權限文件夾,不要忘記修改虛擬主機後重新啓動Apache – user468891

回答

0

在conf你應該改變:

-Indexes 

要:

Indexes 

然後,重新啓動Apache的後並提供編這/etc/apache2/sites-available/myproj沒有一個index.html或的index.php作爲默認文檔,你可以看到在你的瀏覽器中顯示該文件夾的內容。