IPアドレスが111.111.111.111
のサーバー(hogehoge.com
)から
999.999.999.999
のサーバーに移転作業をしています。
111.111.111.111
はApacheでしたが、
999.999.999.999
ではNginxを使用しています。
Nginx、PHP、PHP-FPM、MySQL、phpMyAdminをインストールし、下記のように設定しました。
(アプリケーションはCakePHPを使用しています。)
まだ、DNSで999.999.999.999
にhogehoge.com
を設定しておらず、hostsなども設定していないのに、
http://999.999.999.999
にアクセスすると、なぜかIPがhogehoge.com
に書き換わり、
111.111.111.111
のほうにリダイレクトされてしまいます。
</etc/nginx/conf.d/default.conf> server { listen 80; server_name localhost; root /home/hoge/hoge/cakephp/app/webroot; #index index.html; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; } location /phpMyAdmin { root /usr/share; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { # root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} }
111.111.111.111
のhttpd.confでは、IPでのアクセスの場合ドメインに書き換える設定を書いていましたが、999〜の方は設定していません。
また、phpMyAdmin(http://999.999.999.999/phpMyAdmin)にアクセスしてみても。404 Not Foundになってしまいます。
http://999.999.999.999/aaaaaaa
など、存在しないURLだと書き換わらず、404 Not Foundになります。
原因を調べているのですが、分からず途方に暮れています。
怪しい部分、抜けている設定がありましたらご指摘頂けませんでしょうか。
よろしくお願い致します。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。