私のサーバー環境は linux + nginx + apache + mysql です。ワードプレスをインストールした後、問題があります。バックエンドにはアクセスできますが、フロントエンドには常に次のようなエラーが表示されます。
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
私はFirefoxに目を向けると、以下のようなエラーが表示されます:
301 Moved Permanently
応答:
Reload the page to get source for: http://www.sjdtec.com/
nginx 構成で多くの URL 書き換えを試みましたが、機能しませんでした。以下は、nginx と apache の構成です。
ニンクス
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /var/www/sjdtec;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name www.sjdtec.com;
location / {
#rewrite ^index\.php$ last;
try_files $uri $uri/ /index.php?$args;
#if (!-e $request_filename) {
# rewrite ^(.+)/$ /index.php?q=$1 last;
#}
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
location ~ \.php$ {
proxy_pass http://127.0.0.1:8080;
}
location ~* \.(jpg|jpeg|gif|png|bmp|swf)$ {
access_log off;
expires 30d;
}
location ~* \.(js|css)$ {
access_log off;
expires 1d;
}
error_page 404 /index.php;
location ~ /\.ht {
deny all;
}
アパッチ
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
ServerName www.sjdtec.com
DocumentRoot /var/www/sjdtec
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/sjdtec/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
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
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>