gpt4 book ai didi

Apache 2.4.7 403 禁止错误

转载 作者:太空宇宙 更新时间:2023-11-03 16:51:24 24 4
gpt4 key购买 nike

我正在尝试使用 apache ( http://wiki.openstreetmap.org/wiki/Overpass_API/install ) 将立交桥 api 安装为 Web 服务器

这是我的 000-default.conf

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ExtFilterDefine gzip mode=output cmd=/bin/gzip
DocumentRoot /root/osm-3s_v0.7.4/html

# This directive indicates that whenever someone types http://www.mydomain.com/api/
# Apache2 should refer to what is in the local directory [YOUR_EXEC_DIR]/cgi-bin/
ScriptAlias /api/ /srv/osm3s/cgi-bin/


# This specifies some directives specific to the directory: [YOUR_EXEC_DIR]/cgi-bin/
<Directory "/srv/osm3s/cgi-bin/">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
#SetOutputFilter gzip
#Header set Content-Encoding gzip
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit, alert, emerg
LogLevel warn

CustomLog /var/log/apache2/access.log combined

但是当我尝试运行命令时:

http://175.33.148.57/api/interpreter?data=%3Cprint%20mode=%22body%22/%3E

我收到 403 禁止访问错误。

我已经做了

chmod 777/srv/osm3s/cgi-bin/

但似乎没有任何效果。

请帮忙,我已经坚持了 3 天了!提前致谢。

最佳答案

替换:允许所有经过要求全部授予

<Directory /www/mysite>
Allow from All
</Directory>

<Directory /www/mysite>
Require all granted
</Directory>

关于Apache 2.4.7 403 禁止错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23898866/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com