Last active
April 28, 2016 02:07
-
-
Save edvakf/25c83732858e288b345aca0f52b2777a to your computer and use it in GitHub Desktop.
nginx conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/sites-enabled/php.conf | |
server { | |
listen 80; | |
server_name php.aws; | |
root /var/www/html; | |
location / { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/sites-enabled/ruby.conf | |
server { | |
listen 80; | |
server_name ruby.aws; | |
location / { | |
proxy_pass http://localhost:8000; | |
} | |
} |
/etc/hosts には
xxx.xxx.xxx.xxx php.aws
xxx.xxx.xxx.xxx ruby.aws
みたいな感じで書く( xxx.xxx.xxx.xxx
の部分はサーバーのIPアドレス)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nginxの設定を反映するときは
してから