我有这个网站,我正在尝试使用curl
curl -ikL http://example.no/
在托管它的服务器内部, 它给了我这个,
HTTP / 1.1 403禁止 日期:2019年2月14日,星期四06:27:08 GMT 伺服器:Apache / 2.4.25 内容长度:209 内容类型:text / html; charset = iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access / on this server.<br /> </p> </body></html>
但是当我尝试在其他PC上使用curl时,我得到了正确的输出
我可以从浏览器访问它
这是站点的Apache配置
ServerName ${DOM}
ServerAlias www.${DOM}
ServerAlias mail.${DOM}
DocumentRoot ${HOME}/app/public
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory ${HOME}/app/public>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory ${HOME}/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
我正在使用virtualmin,它具有子域,这很好,我可以从服务器内部卷曲其子域的页面。