نمایش نتایج: از شماره 1 تا 10 , از مجموع 173

موضوع: سوالات و مشکلات تاپیک : آموزش های از وب سرور nGinx - مبتدی تا پیشرفته

Hybrid View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1
    عضو انجمن aalireza439 آواتار ها
    تاریخ عضویت
    Dec 2008
    محل سکونت
    گلستان
    نوشته ها
    244
    تشکر تشکر کرده 
    7
    تشکر تشکر شده 
    396
    تشکر شده در
    251 پست

    پیش فرض پاسخ : سوالات و مشکلات تاپیک : آموزش های از وب سرور nGinx - مبتدی تا پیشرفته

    ویندوز 2008 64 بیتی ، VPS رم 2 گیگ 2 هسته پردازشی ، 400 گیگ هارد

    برای نصب Nginx از winginx استفاده کردم

    فایل کانفیگ اصلی :

    کد:
    #user  nobody;
    worker_processes  2;
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    pid        temp/nginx.pid;
    
    
    events {
        worker_connections  2000;
    }
    
    
    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;
    
    }
    فایل کانفیگ Vhost وب سایت
    کد:
    server {
    	listen   5.199.129.99:80;
    	server_name  mysite.org www.mysite.org;
    
    	root home/mysite.org/public_html;
    	index index.php index.html;
    
    	log_not_found off;
    	charset utf-8;
    
    	access_log  logs/mysite.org-access.log  main;
    
    	location ~ /\. {deny all;}
    
    	location / {}
    
    	location = /favicon.ico {
    	}
    	
        location  /movies2/ {   alias  e:/movies/; 
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    		limit_rate 50k;
    	
    	}
    	location  /movies/ {   alias  c:/inetpub/wwwroot/movies/;
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    limit_rate 50k;		}
    	location  /tvshow/ {   alias  c:/inetpub/wwwroot/tvshow/;
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    limit_rate 50k;		}
    	location  /tv/ {   alias  f:/tv/;
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    limit_rate 50k;		}
    	location = /robots.txt {
    	}
    
    	location ~ \.php$ {
    		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;
    	}
    }
    ویرایش توسط aalireza439 : November 7th, 2012 در ساعت 07:53

  2. #2
    عضو انجمن ali_fattahi آواتار ها
    تاریخ عضویت
    Oct 2008
    محل سکونت
    ---
    نوشته ها
    198
    تشکر تشکر کرده 
    56
    تشکر تشکر شده 
    480
    تشکر شده در
    116 پست

    پیش فرض پاسخ : سوالات و مشکلات تاپیک : آموزش های از وب سرور nGinx - مبتدی تا پیشرفته

    نقل قول نوشته اصلی توسط aalireza439 نمایش پست ها
    ویندوز 2008 64 بیتی ، VPS رم 2 گیگ 2 هسته پردازشی ، 400 گیگ هارد

    برای نصب Nginx از winginx استفاده کردم

    فایل کانفیگ اصلی :

    کد:
    #user  nobody;
    worker_processes  2;
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    pid        temp/nginx.pid;
    
    
    events {
        worker_connections  2000;
    }
    
    
    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;
    
    }
    فایل کانفیگ Vhost وب سایت
    کد:
    server {
    	listen   5.199.129.99:80;
    	server_name  mysite.org www.mysite.org;
    
    	root home/mysite.org/public_html;
    	index index.php index.html;
    
    	log_not_found off;
    	charset utf-8;
    
    	access_log  logs/mysite.org-access.log  main;
    
    	location ~ /\. {deny all;}
    
    	location / {}
    
    	location = /favicon.ico {
    	}
    	
        location  /movies2/ {   alias  e:/movies/; 
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    		limit_rate 50k;
    	
    	}
    	location  /movies/ {   alias  c:/inetpub/wwwroot/movies/;
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    limit_rate 50k;		}
    	location  /tvshow/ {   alias  c:/inetpub/wwwroot/tvshow/;
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    limit_rate 50k;		}
    	location  /tv/ {   alias  f:/tv/;
    	    autoindex on;
            autoindex_exact_size off;
            autoindex_localtime on;
    limit_rate 50k;		}
    	location = /robots.txt {
    	}
    
    	location ~ \.php$ {
    		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;
    	}
    }
    این مشکلیه که توی ویندوز وجود داره . اگه برید روی لینوکس مشکلتون حل میشه.

  3. تعداد تشکر ها از ali_fattahi به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. پاسخ ها: 32
    آخرين نوشته: January 5th, 2017, 01:24
  2. تاپیک جامع سوالات و مشکلات شما در مورد وب سرور Nginx
    توسط nginxweb در انجمن سوالات و مشکلات
    پاسخ ها: 30
    آخرين نوشته: September 20th, 2014, 13:03
  3. پیش فرض اموزش کامل نصب و کانفیگ Nginx
    توسط elementary در انجمن مباحث و منابع آموزشی
    پاسخ ها: 0
    آخرين نوشته: June 17th, 2014, 16:45
  4. پاسخ ها: 7
    آخرين نوشته: March 20th, 2013, 03:28
  5. آموزش های از وب سرور nGinx - مبتدی تا پیشرفته
    توسط ali_fattahi در انجمن وب سرورها
    پاسخ ها: 10
    آخرين نوشته: February 18th, 2013, 23:40

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •