سلام . لطفا فایل رو بفرستید نه متن فایل رو .
برای سوال اولتون هم باید بگم بسته به کانفیگ خودتون میتونید براش مسیر تعیین کنید که کجا باشه . مثلا میتونه تو فایل nginx.conf باشه یا هر مسیری که تو این فایل براش در نظر گرفتید .
سلام . لطفا فایل رو بفرستید نه متن فایل رو .
برای سوال اولتون هم باید بگم بسته به کانفیگ خودتون میتونید براش مسیر تعیین کنید که کجا باشه . مثلا میتونه تو فایل nginx.conf باشه یا هر مسیری که تو این فایل براش در نظر گرفتید .
با سلام
بله من 2 فایل اچتی اکسس و فایل فعلی کانفیگ دومین رو برای nginx رو ضمیمه کردم
مسیر فایل کافیگ دومین هم به شکل زیر هست :
usr/local/nginx/sites-available/domain.com
ممنون میشم که راهنمایی کنید در ضمن اگر هزینه ای هم باید پرداخت بشه با کمال میل پرداخت میکنم. شماره حساب رو برام پی ام کنید
بازهم تشکر
ویرایش توسط ppro : October 10th, 2012 در ساعت 16:40
اختیار دارید . هیچ هزینه ای برای شما نداره ...
کل فایل تبدیل شد به جز دو قسمت اون .
یکیش توسط nginx پشتیبانی نمیشد که یکیش
AddOutputFilter DEFLATE js css htm html xml
هست که به خاطر ***** DEFLATE هست که تو این دستور وجود داره و توسط انجینکس پشتیبانی نیمشه که اگه اشتباه نکنم DEFLATE واسه فشرده سازی این فایل ها هست و میشه با یه ماژوله اضافه و 2-3 خط دستور کانفیگ حلش کرد .
قسمت دوم اون هم اینه :
RewriteBase /blog
که انجینکس بهش گیر میداد ولی من با location حلش کردم . فایل پیوست رو دانلود و تست کنید .
در ضمن توی فایل domain.com رو به او چیزی که میخواید تغییر بدید . و location /blog هم به مسیر اون سایت تو سرور .
اینم از فایل پیوست .
خیلی ممنون از لطف شما . بعد از آزمایش حتما اینجا اطلاع میدم
سپاس
من از nginx برای فایل هاستینگ استفاده می کنم ، مشکلم اینکه ، vps هم هی قطع وصل می ده.
توی لوگ هم این ارور رو نشون می ده 1024 worker_connections are not enough
worker_connections رو مقدارش رو زیاد کردم ، بازم همون مشکل رو درام لوگ هم این ارور رو نشون می ده :maximum number of descriptors supported by select() is 1024 while reading client request lin
من تازه با Nginx کار کردم چیز زیادی نمی دونم ، لطفا اگه میشه راهنمایی کنید.
ویندوز 2008 64 بیتی ، VPS رم 2 گیگ 2 هسته پردازشی ، 400 گیگ هارد
برای نصب Nginx از winginx استفاده کردم
فایل کانفیگ اصلی :
فایل کانفیگ Vhost وب سایتکد:#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; }
کد: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
در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)