Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx - example of php site #1

Closed
f3l1x opened this issue Sep 12, 2017 · 0 comments
Closed

Nginx - example of php site #1

f3l1x opened this issue Sep 12, 2017 · 0 comments
Assignees

Comments

@f3l1x
Copy link
Member

f3l1x commented Sep 12, 2017

##
# Virtual Host Configs
##
upstream app {
    server unix:/var/run/php71-fpm.sock;
}

server {
  listen 80;

  index index.html index.php;
  root /srv/www;

  location / {
    try_files $uri $uri/ /index.php$is_args$args;
  }

  location ~* \.php$ {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;

    fastcgi_pass   app;
    fastcgi_index  index.php;
    include        fastcgi_params;

    fastcgi_param  PATH_INFO $fastcgi_path_info;
    fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_path_info;
    fastcgi_param  SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    fastcgi_param  DOCUMENT_ROOT $realpath_root;

    try_files $uri =404;
  }
}
@f3l1x f3l1x self-assigned this Sep 12, 2017
@f3l1x f3l1x closed this as completed Dec 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant