Skip to content

Instantly share code, notes, and snippets.

@BrianGilbert
Last active August 29, 2015 14:13
Show Gist options
  • Save BrianGilbert/4344541a098b1f5cd902 to your computer and use it in GitHub Desktop.
Save BrianGilbert/4344541a098b1f5cd902 to your computer and use it in GitHub Desktop.
OJS VHost example for aegir box
server {
listen 127.0.0.1:443 ssl;
server_name ojs.ld; # only used for logging, because default_server sends all requests to this block
ssl_certificate /usr/local/etc/ssl/private/nginx-wild-ssl.crt;
ssl_certificate_key /usr/local/etc/ssl/private/nginx-wild-ssl.key;
limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
keepalive_timeout 70;
###
### Deny known crawlers.
###
if ($is_crawler) {
return 403;
}
root /var/aegir/php-sites/ojs.ld;
index index.php;
# Extra configuration from modules:
include /var/aegir/config/includes/nginx_ojs_include.conf;
}
server {
# moved to https
#limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
listen *:80;
server_name ojs.ld;
return 301 https://$host$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment