環境 centos7
サーバー nginx 現時点での最新版
centos7にnginxをインストールしました。
nginxのデフォルトポートとは別のポートにアクセスしたときに
別のページを表示させたいので
/etc/nginx/conf.d/default.conf に以下のように設定後
http://192.168.235.2:81/ にアクセスしたのですが
ERR_CONNECTION_TIMED_OUT と表示されてしまいます。
server {
listen 80;
server_name 192.168.235.2:80;
root /usr/share/nginx/html/l/blog/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
}
server {
listen 81;
server_name 192.168.235.2:81;
root /usr/share/nginx/html/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
}
/etc/nginx/nginx.conf はいじっておりません
どうすれば81番ポートで- リストアクセスできるようになるでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/05 10:17