Skip to content

Instantly share code, notes, and snippets.

@edvakf edvakf/php.conf
Last active Apr 28, 2016

Embed
What would you like to do?
nginx conf
# /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;
}
}
# /etc/nginx/sites-enabled/ruby.conf
server {
listen 80;
server_name ruby.aws;
location / {
proxy_pass http://localhost:8000;
}
}
@edvakf

This comment has been minimized.

Copy link
Owner Author

commented Apr 27, 2016

nginxの設定を反映するときは

sudo nginx -t

してから

sudo systemctl restart nginx
@edvakf

This comment has been minimized.

Copy link
Owner Author

commented Apr 27, 2016

/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
You can’t perform that action at this time.