PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : nginx rules



orchid
June 24th, 2015, 20:16
من لازمه این فایل رو به سرور اضافه کنم اما نمیدونم باید به کجا اضافه بشه
کل فایل احتیاج هست یا بخش کوچکی از فایل مسیری که تو فایل اشاره شده رو پیدا نکردم


If you're using NGINX as your webserver, use the rewrite rules below instead of .htaccess.
These will need adding to /etc/nginx/sites-available/default or wherever this file is located on your nginx install.
################################################## ###################### START NGINX RULES############################################# ########################## # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; } }
location / { if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; } }
location /files/ { internal; }
# these locations would be hidden by .htaccess normally location /core/logs/ { deny all; }################################################# ####################### END NGINX RULES############################################# ##########################

################################################## ###################### Full /etc/nginx/sites-available/default file example below:############################################ ###########################server { listen 80; server_name localhost; # change this for your server root /usr/share/nginx/html; index index.php; client_max_body_size 5G;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
location / { if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; } }
location /files/ { internal; }
# these locations would be hidden by .htaccess normally location /core/logs/ { deny all; }}

nginxweb
June 24th, 2015, 21:01
درود

دوست عزیز بستگی به نصب nginx در سرور شما دارد اما بطوریش فرض فایل کانفیگ وب سرور nginx فایلی بنام nginx.conf میباشد که در مسیر


/etc/nginx/nginx.conf

قرار دارد

همچنین گاهی برای سایت ها virtualhost توی این فایل include میشود که در انها نیز میتوانید این rule ها را وارد کنید مانند:



/etc/nginx/sites-enabled/

orchid
June 24th, 2015, 21:54
درود

دوست عزیز بستگی به نصب nginx در سرور شما دارد اما بطوریش فرض فایل کانفیگ وب سرور nginx فایلی بنام nginx.conf میباشد که در مسیر



قرار دارد

همچنین گاهی برای سایت ها virtualhost توی این فایل include میشود که در انها نیز میتوانید این rule ها را وارد کنید مانند:


این رول فقط برای یک هاستم هست باید مربوط به اون دامنه وارد بشه یا نه تو اون مسیری که گفتید وارد میشه؟