Skip to content

Instantly share code, notes, and snippets.

@edvakf
Last active April 28, 2016 02:07
Show Gist options
  • Save edvakf/25c83732858e288b345aca0f52b2777a to your computer and use it in GitHub Desktop.
Save edvakf/25c83732858e288b345aca0f52b2777a to your computer and use it in GitHub Desktop.
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
Copy link
Author

edvakf commented Apr 27, 2016

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

sudo nginx -t

してから

sudo systemctl restart nginx

@edvakf
Copy link
Author

edvakf 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