Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name <my server ip>;
- root /var/www/html;
- index index.php index.html index.htm;
- location / {
- try_files $uri $uri/ =404;
- }
- error_page 404 /404.html;
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /var/www/html;
- }
- location ~ .php$ {
- try_files $uri =404;
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
- server {
- listen 80;
- server_name nativeleaf.co.uk www.nativeleaf.co.uk;
- access_log /var/www/html/nativeleaf.co.uk/access.log combined;
- root /var/www/html/nativeleaf.co.uk;
- }
- ; Start a new pool named 'www'.
- [www]
- ; The address on which to accept FastCGI requests.
- ; Valid syntaxes are:
- ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
- ; a specific port;
- ; 'port' - to listen on a TCP socket to all addresses on a
- ; specific port;
- ; '/path/to/unix/socket' - to listen on a unix socket.
- ; Note: This value is mandatory.
- ;listen = 127.0.0.1:9000
- listen = /var/run/php-fpm/php-fpm.sock
- ; Set listen(2) backlog. A value of '-1' means unlimited.
- ; Default Value: -1
- ;listen.backlog = -1
- ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
- ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
- ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
- ; must be separated by a comma. If this value is left blank, connections will be
- ; accepted from any ip address.
- ; Default Value: any
- listen.allowed_clients = 127.0.0.1
- ; Set permissions for unix socket, if one is used. In Linux, read/write
- ; permissions must be set in order to allow connections from a web server. Many
- ; BSD-derived systems allow connections regardless of permissions.
- ; Default Values: user and group are set as the running user
- ; mode is set to 0666
- listen.owner = nginx
- listen.group = nginx
- listen.mode = 0750
- ; Unix user/group of processes
- ; Note: The user is mandatory. If the group is not set, the default user's group
- ; will be used.
- ; RPM: apache Choosed to be able to access some dir as httpd
- user = nginx
- ; RPM: Keep a group allowed to write in log dir.
- group = nginx
Add Comment
Please, Sign In to add comment