Skip to content

Instantly share code, notes, and snippets.

@barrucadu
Created June 14, 2013 12:51
Show Gist options
  • Save barrucadu/5781554 to your computer and use it in GitHub Desktop.
Save barrucadu/5781554 to your computer and use it in GitHub Desktop.
Flexible nginx config Read "vhosts-aur.conf" and "vhosts-lists.conf" as "vhosts/aur.conf" and "vhosts/lists.conf", I can't have subdirectories in a gist.
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80 default_server;
return 444;
}
include vhosts/*.conf;
}
server {
listen 80;
server_name aur.archhurd.org;
charset utf-8;
access_log logs/aur.access.log;
error_log logs/aur.error.log;
root /srv/http/aur/web/html;
index index.html index.htm index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location /packages/ {
autoindex on;
rewrite /packages/(.*) /$1 break;
root /srv/http/aur/unsupported;
}
}
server {
listen 80;
server_name lists.archhurd.org;
charset utf-8;
access_log logs/lists.access.log;
error_log logs/lists.error.log;
root /srv/http/lists;
index index.html index.htm;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment