0 notes &
rails使えるまでが非常に簡単になっている件について 続きの続き
sudo mkdir /opt/nginx/sites-enabled sudo mv /opt/nginx/conf/nginx.conf /opt/nginx/conf/nginx.conf.default sudo nano /opt/nginx/conf/nginx.conf
user www-data;
worker_processes 1;
events {
worker_connections 1024;
}
http {
passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9;
passenger_ruby /usr/local/bin/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
include /opt/nginx/sites-enabled/*;
}
sudo nano /opt/nginx/sites-available/default
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
sudo ln -s /opt/nginx/sites-available/default /opt/nginx/sites-enabled/default sudo /etc/init.d/nginx restart