winginx, podpora nette frameworku

Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
matthew
Člen | 1
+
0
-

Zdravim.
Jsem začátečník, potřeboval bych poradit s nastavením serveru pro nette. Mám Winginx. Postupuji podle konfigurace zde

Mám problém s nginx.conf, pokud si ho otevřu na svém localhostu a upravím tak, že zkopíruju worker_processes 2 za worker_processes 1, celý localhost spadne. Nejspíš je to má nevědomost, ale již několik dní si nevím rady. Níže přikládám jak cýlý nginx.conf vypadá po úpravě.

Děkuji za info

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid        temp/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    client_max_body_size 55m;

    #gzip  on;

	scgi_temp_path  temp/uwsgi_temp 1 2;
	uwsgi_temp_path  temp/uwsgi_temp 1 2;

	fastcgi_connect_timeout 1;


	server {
		listen   127.0.0.1:80;

		root home/localhost/public_html;
		index index.php index.html;

		log_not_found off;
        charset utf-8;

		access_log  logs/access.log  main;

		location ~ /\. {deny all;}

		location / {

			if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
				root home/$2/public_html;
				access_log  logs/$2-access.log  main;
			}

		}

        location ~ \.php$ {

			if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
				root home/$2/public_html;
				access_log  logs/$2-access.log  main;
			}

			if (!-e $document_root$document_uri){return 404;}
			fastcgi_pass localhost:9000;
			fastcgi_index index.php;
			fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

			include fastcgi_params;

        }
	}

	server {
		listen 127.0.0.1:443;
		include ssl.conf;

		root home/localhost/public_html;
		index index.php index.html;

		log_not_found off;
        charset utf-8;

		access_log  logs/access.log  main;

		location ~ /\. {deny all;}

		location / {

			if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
				root home/$2/public_html;
				access_log  logs/$2-access.log  main;
			}

		}

        location ~ \.php$ {

			if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
				root home/$2/public_html;
				access_log  logs/$2-access.log  main;
			}

			if (!-e $document_root$document_uri){return 404;}
			fastcgi_pass localhost:9000;
			fastcgi_index index.php;
			fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

			include fastcgi_params;

        }
	}


	include tools-*.conf;

	include vhosts/*.conf;


}

worker_processes 2;



error_log /usr/local/var/log/nginx/error.log;



events {

worker_connections 1024;

}



http {

include mime.types;

default_type application/octet-stream;



sendfile on;

keepalive_timeout 560;

autoindex on;



client_max_body_size 20M;



gzip on;

gzip_http_version 1.1;

gzip_comp_level 2;

gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;



server {

listen 80;

server_name localhost;



root /Users/jsifalda/nginx/;



include common/common.conf;

include common/php.conf;

include common/nette.conf;

}



include sites-enabled/*.conf;



}
enumag
Člen | 2118
+
0
-

S nginx nemám pražádné zkušenosti, ale nemůže tomu vadit, že tam tu direktivu worker_processes máš 2× s různou hodnotou?

Majkl578
Moderator | 1364
+
0
-

Off-topic sem nepatří, zkus to jinde, např. na http://diskuse.jakpsatweb.cz.