Skip to content

Instantly share code, notes, and snippets.

@leite
Last active January 2, 2016 15:58
Show Gist options
  • Save leite/8326589 to your computer and use it in GitHub Desktop.
Save leite/8326589 to your computer and use it in GitHub Desktop.
basic configuration of nginx.conf
user nginx www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/sites-enabled/*;
}
@leite
Copy link
Author

leite commented Jan 8, 2014

inside /etc/nginx/sites-enabled save a file with the config below ... be creative, any name

server {
  listen      80;
  server_name adem.ar;
  charset     utf-8;
  root        /home/ademar/ademar/ademar;

  location / { index index.html index.htm; }
}

Open /etc/hosts and add "127.0.0.1 adem.ar"

important, you must have at least a folder with index.html in /home/ademar/ademar/ademar - make sure that you have user nginx and group www-data in your distro, that folder should belongs to group www-data with an 755 mask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment