Skip to content

Instantly share code, notes, and snippets.

@sineld
Last active December 15, 2015 07:09
Show Gist options
  • Select an option

  • Save sineld/5221243 to your computer and use it in GitHub Desktop.

Select an option

Save sineld/5221243 to your computer and use it in GitHub Desktop.
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
autoindex on;
charset utf-8;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
#local bas
server {
listen 80;
server_name localhost;
root C:/Users/Tuana/Dropbox/_webserver;
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
}
location / {
root C:/Users/Tuana/Dropbox/_webserver;
index index.html index.php;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME C:/Users/Tuana/Dropbox/_webserver$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
#local bit
#ey bas
server {
listen 80;
server_name ezgiyazma.se;
root C:/Users/Tuana/Dropbox/_webserver/ezgiyazma/public;
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
}
location / {
root C:/Users/Tuana/Dropbox/_webserver/ezgiyazma/public;
index index.html index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
#rewrite ^/(.*)/$ /$1 permanent;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME C:/Users/Tuana/Dropbox/_webserver/ezgiyazma/public$fastcgi_script_name;
include fastcgi_params;
}
}
#ey bit
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment