ubuntu - Owncloud 6 and Nginx -


I will configure my home PC for Nkclue 6 by NGNA at Ubuntu 14.04.

When I receive only one "502 - Bad Gateway" error, when I https: // localhost / owncloud / or https: // localhost / I am

These are the configuration files that I use.

/etc/nginx/nginx.conf

  User www-data; Worker_processes 2; Pid /run/nginx.pid; Events {worker_connections 768; } Http {sendfile on; Tcp_nopush on; Tcp_nodelay on; Keepalive_timeout 65; Types_hash_max_size 2048; Include /etc/nginx/mime.types; Default_type application / octet-stream; Access_log /var/log/nginx/access.log; Error_log /var/log/nginx/error.log; Jeez; Gzip_disable "msie6"; Include /etc/nginx/conf.d/*.conf; Include / etc / nginx / sites-enabled / *; }  

/ etc / nginx / sites-enabled / default

  server {80 default_server; Listen [::]: 80 default_server ipv6only = on; Root / usr / share / nginx / www /; Index index index.htm index.php; Server_name localhost; Location / {try_files $ uri $ uri / = 404; } Location ~ \ .php $ {fastcgi_split_path_info ^ (. PHP). (/.+) $; Fastcgi_pass Unix: /var/run/php5-fpm.sock; Fastcgi_index index.php; Includes fastcgi_params; }}  

/ etc / nginx / sites-enabled / owncloud

  upstream php-handler {server 127.0.0.1: 9000; } Server {80; Server_name localhost; Return 301 https: // $ server_name $ request_uri; } Server {443 SSL; Server_name localhost; Ssl_certificate /usr/share/nginx/ssl/myssl.crt; Ssl_certificate_key /usr/share/nginx/ssl/myssl.key; Root / usr / share / nginx / www / owncloud /; Client_max_body_size 10G; Fastcus_buffers 64 4K; Rewrite ^ / caldav (. *) $ /remote.php/caldav$1 redirect; Rewrite ^ / CardDown (. *) $ /remote.php/carddav$1 redirect; Rewrite ^ / webdav (. *) $ /remote.php/webdav$1 redirect; Index index.php; Error_page 403 / core / templates / 403.php; Error_page 404 / core / templates / 404.php; Location = /robots.txt {Allow all; Log_not_found off; Access_log off; } Place ~ ^ / (data | config | \ .ht | db_structure \ .xml | README) {reject all; } Place / {rewrite ^ /. Famous / Host-Meta / Public Php? Service = host- last; Rewrite ^ /. Famous / host-meta.json /public.php?service=host-meta-json final; Rewrite ^ /. Famous / CardDown /remote.php/carddav/ Redirected; Rewrite ^ /. Famous / Kaldav /remote.php/caldav/ Redirects; Rewrite ^ (/ core / doctor / [^ \ /] + /) $$ 1 / index.html; Try_files $ uri $ ur / index.php; } Place ~ ^ (. +? \ Php) (/.*)? $ {Try_files $ 1 = 404; Includes fastcgi_params; Fastcgi_param SCRIPT_FILENAME $ document_root $ 1; FastCase_Parsh Pathhindex $ 2; HTTPS at Fastcgi_param; Fastcgi_pass php-handler; } Place ~ * ^. + \. (Jpg | jpeg | gif | bmp | ico | png | css | js | swf) $ {30d expired; Access_log off; thank you in advanced! 

Check your www user = www-data group = conf for www-data then sudo service nginx restart Then sudo service php-fpm restart


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -