[英]Where is that folder /etc/apache2/sites-available on mac os yosemite?
[英]What is the mac equivalent of “/etc/apache2/sites-available”?
我正在從源代碼安裝Koha。 通用Unix方向指示sudo make install之后的以下步驟
sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha
嗯?
我的apache2目錄不包含可用站點,僅/ private / etc / apache2 / extra /private/etc/apache2/httpd.conf / private / etc / apache2 / magic /private/etc/apache2/mime.types / private / etc / apache2 /原始/ private / etc / apache2 /其他/ private / etc / apache2 / users
我應該能夠瀏覽到http://servername:8080/
來運行Koha,在koha-httpd.conf中將“ servername”指定為如下所示:
## Intranet
<VirtualHost 192.168.1.4:8080>
ServerAdmin webmaster@local
DocumentRoot /usr/share/koha/intranet/htdocs
ServerName John-Breedloves-Mac-mini.local:8080
# ServerAlias intranet.mydomain.com
ScriptAlias /cgi-bin/koha/ "/usr/share/koha/intranet/cgi-bin/"
ScriptAlias /index.html "/usr/share/koha/intranet/cgi-bin/mainpage.pl"
ScriptAlias /search "/usr/share/koha/intranet/cgi-bin/search.pl"
ErrorLog /var/log/koha/koha-error_log
# TransferLog /var/log/koha/koha-access_log
SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
SetEnv PERL5LIB "/usr/share/koha/lib"
Options +FollowSymLinks
ErrorDocument 400 /cgi-bin/koha/errors/400.pl
ErrorDocument 401 /cgi-bin/koha/errors/401.pl
ErrorDocument 403 /cgi-bin/koha/errors/403.pl
ErrorDocument 404 /cgi-bin/koha/errors/404.pl
ErrorDocument 500 /cgi-bin/koha/errors/500.pl
RewriteEngine On
但是,當我轉到http://john-breedloves-mac-mini.local:8080/
,我得到:
具有諷刺意味的東西。
幫助菜鳥。
看起來/private/etc/apache2/other/
將是大約對應的文件夾。 /etc/apache2/httpd.conf
包含Include /private/etc/apache2/other/*.conf
的指令,該指令Include /private/etc/apache2/other/*.conf
該文件夾中的所有文件,就像Apache的Linux安裝中常見的sites-available文件夾一樣。
運行apachectl -S
,它是apachectl -t -D DUMP_VHOSTS
簡寫
根據apachectl的man文件,這將顯示已解析的設置(當前僅顯示vhost設置)。 順便說一句,它還會檢查您的配置文件中是否有錯誤。
安德魯的答案是正確的。 在安裝時,我還必須更改
Order allow,deny
Deny from all
至
Order allow,deny
Allow from all
在/etc/apache2/httpd.conf中。
您在:8080獲得服務器的事實表明您可能正在運行與基本系統安裝不同的apache配置,例如MAMP ; 我不認為apache默認會監聽:8080。
我也有這個問題。 它似乎正在占用空間,因為osx上安裝的apache的默認版本會覆蓋其他版本。 要禁用它,請轉到“系統偏好設置>共享”,然后取消選中“網絡共享”。
祝好運!
請注意,ServerRoot指定可以在哪里找到子目錄conf和日志。
在我的httpd.conf中,將其設置為/ usr
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.