nginx.conf.sample 1.1 KB
Newer Older
chimo's avatar
chimo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
server {
  # Ports
  listen 80;
  # Uncomment the following line
  # to enable HTTPS
  #listen 443 ssl;

  # Server name
  # Change "example.org" to your domain name
  server_name example.org;

  # SSL
  # Uncomment and change the paths to setup
  # your SSL key/cert. See https://cipherli.st/
  # for more information
  #ssl_certificate       /path/to/ssl.cert;
  #ssl_certificate_key   /path/to/ssl.key;

  # Logs
  # Uncomment and change the paths to setup
  # logging
  #access_log /path/to/access.log;
  #error_log  /path/to/error.log;

  # Root
  # Change the path below to where you installed
  # GNU social
  root /path/to/gnusocial/root;

  # Index
  index index.php;

  # PHP
  location ~ \.php {
    fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
    # Remove the "fastcgi_pass" line above and uncomment
    # the one below to use TCP sockets instead of Unix sockets
    #fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi.conf;
  }

  # Location
  location / {
    try_files $uri $uri/ @gnusocial;
  }

  # Fancy URLs
  location @gnusocial {
    rewrite ^(.*)$ /index.php?p=$1 last;
  }
}