WordPress已登录的用户可以正常执行Ajax请求,但未登录的用户却会出现403禁止访问错误。
我们尝试了以下解决方案:
https://wordpress.org/support/topic/admin-ajax-php-403-forbidden-2/
https://wordpress.stackexchange.com/questions/345194/403-forbidden-you-dont-have-permission-to-access-wp-admin-admin-ajax-php-on
我们的站点与Azure AD连接,并重定向到我们的服务器。
.config文件。
ServerAdmin ****
DocumentRoot /var/www/html
ServerName blog.xxxx.com
ServerAlias blog.xxx.com
Redirect permanent / https://domain/blogs
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerAdmin ***
ServerName blog.xxx.com
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile certificate.crt
SSLCertificateKeyFile privatekey.key
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>```