PDA

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



hamed75
August 3rd, 2015, 01:31
اقا ما وب سرور nginx رو نصب کردیم به هزار زحمت
حالا ادامه مطلبم نات فونت میده
مثلا:
http://sadsong.ir/دانلود-آهنگ-آفتاب-مگه-امروز-از-کدوم-ور-س

روی وردپرس هستم
صفحه اولمم بالا میاد

iranian-portal
August 3rd, 2015, 01:50
درود ،

قبل از هر چیز ، ساده ترین و اولین موردی که باید امتحان کنید ، پیوندهای یکتا و .htaccess هست.

امتحان فرمودید؟ مشکلی از این بابت نیست؟

hamed75
August 3rd, 2015, 01:53
.htaccess رو کامل حذفیدم
پیوند یکتا رو چیکار کنم؟

iranian-portal
August 3rd, 2015, 01:59
.htaccess رو کامل حذفیدم
پیوند یکتا رو چیکار کنم؟




گرامی ، احتمالا مشکل کارتون همینجاست ، پیوندهای یکتا رو به حالت پیشفرض تغییر بدید ، نتیجه رو اعلام بفرمایید

hegza
August 3rd, 2015, 02:32
در انجین ساختار اچ تی اکسس فرق میکنه
https://codex.wordpress.org/Nginx




While the LAMP stack is very popular (Linux + Apache + MySQL + PHP) for powering WordPress, a lot of people have started using Nginx in place of Apache. This page aims to help those looking to configure WordPress with Nginx.
Before you consider using Nginx, be aware that PHP APC or a similar opcode cache with a WordPress caching plugin is going to offer significant performance improvements over just switching from Apache to nginx. If you aren't already using a PHP opcode cache and WordPress caching plugin, Nginx will do little for your WordPress-based website's performance. WordPress development is intertwined with the Apache world, and as a result, support for Nginx-based setups is limited; but it is growing. Factor these things into your decision to use Nginx.
This is not going to cover how to install and configure Nginx, so this assumes that you have already installed Nginx and have a basic understanding of how to work with it.
Note: This has been tested on and known to work with:


Arch Linux 64 bit (Nginx 0.8.54)
Mac OSX Server Leopard and OSX Server Snow Leopard via MacPorts (Nginx 0.8.54, php-fpm support requires modifying the PHP 5.3 'Portfile')
Ubuntu Server 10.04 LTS (Nginx 0.8.54 with php-fpm)



Contents


1 Generic and Network (Multi-Site) Support (https://codex.wordpress.org/Nginx#Generic_and_Network_.28Multi-Site.29_Support)

1.1 Main (generic) startup file (https://codex.wordpress.org/Nginx#Main_.28generic.29_startup_file)
1.2 Per Site configuration (https://codex.wordpress.org/Nginx#Per_Site_configuration)
1.3 Global restrictions file (https://codex.wordpress.org/Nginx#Global_restrictions_file)
1.4 General WordPress rules (https://codex.wordpress.org/Nginx#General_WordPress_rules)

1.4.1 URL Rewrites / Permalinks (https://codex.wordpress.org/Nginx#URL_Rewrites_.2F_Permalinks)


1.5 WordPress Multisite Subdirectory rules (https://codex.wordpress.org/Nginx#WordPress_Multisite_Subdirectory_rules)
1.6 WP Super Cache Rules (https://codex.wordpress.org/Nginx#WP_Super_Cache_Rules)
1.7 W3 Total Cache Rules (https://codex.wordpress.org/Nginx#W3_Total_Cache_Rules)


2 Nginx fastcgi_cache (https://codex.wordpress.org/Nginx#Nginx_fastcgi_cache)
3 Better Performance for Static Files in Multisite (https://codex.wordpress.org/Nginx#Better_Performance_for_Static_Files_in_Multi site)

3.1 Notes (https://codex.wordpress.org/Nginx#Notes)


4 Notes (https://codex.wordpress.org/Nginx#Notes_2)
5 Warning (https://codex.wordpress.org/Nginx#Warning)
6 Resources (https://codex.wordpress.org/Nginx#Resources)

6.1 Reference (https://codex.wordpress.org/Nginx#Reference)
6.2 External Links (https://codex.wordpress.org/Nginx#External_Links)
6.3 Scripts & Tools (https://codex.wordpress.org/Nginx#Scripts_.26_Tools)
6.4 Securing Nginx (https://codex.wordpress.org/Nginx#Securing_Nginx)




Generic and Network (Multi-Site) Support To make WordPress work with Nginx you have to configure the backend php-cgi. The options available are 'fastcgi' or 'php-fpm'. Here I'm using php-fpm because it is included in PHP 5.3, so installing it is more straightforward.
The Nginx configuration has been broken up into five distinct files and it's heavily commented to make each option easier to understand. The author (http://wordpress.org/support/profile/bigsite) also made a best-effort attempting to follow "best practices" for nginx configurations.
Main (generic) startup file This is equivalent to /etc/nginx/nginx.conf (or /etc/nginx/conf/nginx.conf if you're using Arch Linux).
# Generic startup file.
user {user} {group};

#ususally equal to number of CPU's you have. run command "grep processor /proc/cpuinfo | wc -l" to find it
worker_processes 2;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

# Keeps the logs free of messages about not being able to bind().
#daemon off;

events {
worker_connections 1024;
}

http {
# rewrite_log on;

include mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
# tcp_nopush on;
keepalive_timeout 3;
# tcp_nodelay on;
# gzip on;
#php max upload limit cannot be larger than this
client_max_body_size 13m;
index index.php index.html index.htm;

# Upstream to abstract backend connection(s) for PHP.
upstream php {
#this should match value of "listen" directive in php-fpm pool
server unix:/tmp/php-fpm.sock;
# server 127.0.0.1:9000;
}

include sites-enabled/*;
}
Now, you'll observe that this is a bit different from most nginx.conf files. I opted to follow the Ubuntu/Debian method of declaring enabled sites for maximum flexibility - using 'sites-available' to store a config and then symlink to the config file from 'sites-enabled'. It takes a little extra effort to set up but is well worth that effort for managing multiple websites.
Per Site configuration # Redirect everything to the main site. We use a separate server statement and NOT an if statement - see http://wiki.nginx.org/IfIsEvil

server {
server_name _;
rewrite ^ $scheme://mysite.com$request_uri redirect;
}

server {
server_name mysite.com;
root /var/www/mysite.com;

index index.php;

include global/restrictions.conf;

# Additional rules go here.

# Only include one of the files below.
include global/wordpress.conf;
# include global/wordpress-ms-subdir.conf;
# include global/wordpress-ms-subdomain.conf;
}
If you look around the Internet, you can find various WordPress configs for nginx. Most of them drop stuff into the 'server' block, but I figure some people might want to reuse the same logic over and over. As long as the blog is in the root of the site, this is no problem. I created a 'global' subdirectory to add extra rules for general purpose use and performing quick WordPress setups (either /etc/nginx/conf/global/ or /etc/nginx/global/ depending on how your nginx install is set up).
Global restrictions file # Global restrictions configuration file.
# Designed to be included in any server {} block.</p>
location = /favicon.ico {
log_not_found off;
access_log off;
}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~ /\. {
deny all;
}

# Deny access to any files with a .php extension in the uploads directory
# Works in sub-directory installs and also in multisite network
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}

General WordPress rules For single blog installations, here is the 'global/wordpress.conf' file:
# WordPress single blog rules.
# Designed to be included in any server {} block.

# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

# Directives to send expires headers and turn off 404 error logging.
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|at om|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls |exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
}

# Uncomment one of the lines below for the appropriate caching plugin (if used).
#include global/wordpress-wp-super-cache.conf;
#include global/wordpress-w3-total-cache.conf;

# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
# This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default)

include fastcgi.conf;
fastcgi_index index.php;
# fastcgi_intercept_errors on;
fastcgi_pass php;
}
More info about path info security solution: http://wiki.nginx.org/PHPFcgiExample
URL Rewrites / Permalinks WordPress includes checks for Apache mod_rewrite before enabling permalinks. For older versions of WordPress, this check would fail on nginx, which can leave 'index.php' in the permalink structure. This was fixed in WordPress 3.7, which now detects nginx servers and enables "pretty" permalinks automatically.
For pre-WordPress 3.7 installs, to force WordPress to enable permalinks completely, add the following to a plugin or use Nginx Helper plugin (http://wordpress.org/extend/plugins/nginx-helper/). Nginx Helper also provides support for Nginx Map (http://codex.wordpress.org/Nginx#Better_Performance_for_Static_Files_in_Multi site)
add_filter( 'got_rewrite', '__return_true' );
If placed in an MU plugin, like '/wp-content/mu-plugins/nginx.php', this code will not be accidentally disabled. Also, WordPress 3.0 or higher is required to have a filter '__return_true'.
WordPress Multisite Subdirectory rules For multisite subdirectory installations, here is the 'global/wordpress.conf' file:
# WordPress multisite subdirectory rules.
# Designed to be included in any server {} block.

# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
try_files $uri $uri/ /index.php?$args;
}

# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}

location ~ ^/[_0-9a-zA-Z-]+/files/(.*)$ {
try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
access_log off; log_not_found off; expires max;
}

#avoid php readfile()
location ^~ /blogs.dir {
internal;
alias /var/www/example.com/htdocs/wp-content/blogs.dir ;
access_log off; log_not_found off; expires max;
}

# Uncomment one of the lines below for the appropriate caching plugin (if used).
#include global/wordpress-ms-subdir-wp-super-cache.conf;
#include global/wordpress-ms-subdir-w3-total-cache.conf;

# Rewrite multisite '.../wp-.*' and '.../*.php'.
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
}

# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ \.php$ {
# Zero-day exploit defense.
# http://forum.nginx.org/read.php?2,88845,page=3
# Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
# Comment the 'try_files' line out if you set up php-fpm/php-fcgi on another machine. And then cross your fingers that you won't get hacked.
try_files $uri =404;

fastcgi_split_path_info ^(.+\.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_intercept_errors on;
fastcgi_pass php;
}
WP Super Cache Rules # WP Super Cache rules.
# Designed to be included from a 'wordpress-ms-...' configuration file.

set $cache_uri $request_uri;

# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'null cache';
}

if ($query_string != "") {
set $cache_uri 'null cache';
}

# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';
}

# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
set $cache_uri 'null cache';
}

# START MOBILE
# Mobile browsers section to server them non-cached version. COMMENTED by default as most modern wordpress themes including twenty-eleven are responsive. Uncomment config lines in this section if you want to use a plugin like WP-Touch
# if ($http_x_wap_profile) {
# set $cache_uri 'null cache';
#}

#if ($http_profile) {
# set $cache_uri 'null cache';
#}

#if ($http_user_agent ~* (2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cell phone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800)) {
# set $cache_uri 'null cache';
#}

#if ($http_user_agent ~* (w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew |cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi |keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap |sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-)) {
# set $cache_uri 'null cache';
#}
#END MOBILE

# Use cached or actual file if they exists, otherwise pass request to WordPress
location / {
try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$args ;
}
Experimental modifications:
If you are using HTTPS, the latest development version of WP Super Cache may use a different directory structure to differentiate between HTTP and HTTPS. The ${scheme} variable will eventually become a necessary part of the path in that case. try_files line may look like below:
location / {
try_files /wp-content/cache/supercache/$http_host/$scheme$cache_uri/index.html $uri $uri/ /index.php?$args ;
}
W3 Total Cache Rules W3 Total Cache uses different directory structure for disk-based cache storage depending on WordPress configuration.
Cache validation checks will remain common as shown below:
#W3 TOTAL CACHE CHECK
set $cache_uri $request_uri;

# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $cache_uri 'null cache';
}
if ($query_string != "") {
set $cache_uri 'null cache';
}

# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';
}

# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
set $cache_uri 'null cache';
}
#ADD mobile rules from WP SUPER CACHE section above

#APPEND A CODE BLOCK FROM BELOW...
FOR Normal WordPress (without Multisite) Use following:
# Use cached or actual file if they exists, otherwise pass request to WordPress
location / {
try_files /wp-content/w3tc/pgcache/$cache_uri/_index.html $uri $uri/ /index.php?$args ;
}
FOR Multisite with subdirectories Use following:
if ($request_uri ~* "^/([_0-9a-zA-Z-]+)/.*" ){
set $blog $1;
}

set $blog "${blog}.";

if ( $blog = "blog." ){
set $blog "";
}

# Use cached or actual file if they exists, otherwise pass request to WordPress
location / {
try_files /wp-content/w3tc-$blog$host/pgcache$cache_uri/_index.html $uri $uri/ /index.php?$args ;
}
FOR Multisite with Subdomains/Domain-mapping Use following:
location / {
try_files /wp-content/w3tc-$host/pgcache/$cache_uri/_index.html $uri $uri/ /index.php?$args;
}
Notes


Nginx can handle gzip & browser cache automatically so better leave that part to nginx.
W3 Total Cache Minify rules will work with above config without any issues.

Nginx fastcgi_cache Nginx can perform caching on its own end to reduce load on your server. When you want to use Nginx's built-in fastcgi_cache, you better compile nginx with fastcgi_cache_purge (https://github.com/FRiCKLE/ngx_cache_purge) module. It will help nginx purge cache for a page when it gets edited. On the WordPress side, you need to install a plugin like Nginx Helper (http://wordpress.org/extend/plugins/nginx-helper/) to utilize fastcgi_cache_purge feature.
For Ubuntu users, you can use launchpad repo by Brian Mercer (https://launchpad.net/%7Ebrianmercer/+archive/nginx) to install/upgrade nginx with fastcgi_cache_purge support.
Config will look like below:
Define a Nginx cache zone in http{...} block, outside server{...} block
#move next 3 lines to /etc/nginx/nginx.conf if you want to use fastcgi_cache across many sites
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:500m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;
For wordpress site config, in server{..} block add a cache check block as follow
#fastcgi_cache start
set $no_cache 0;

# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $no_cache 1;
}
if ($query_string != "") {
set $no_cache 1;
}

# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $no_cache 1;
}

# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $no_cache 1;
}
Then make changes to PHP handling block
Just add this to the following php block. Note the line fastcgi_cache_valid 200 60m; which tells nginx only to cache 200 responses(normal pages), which means that redirects are not cached. This is important for multilanguage sites where, if not implemented, nginx would cache the main url in one language instead of redirecting users to their respective content according to their language.
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;

fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 60m;
Such that it becomes something like this
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
# This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default)

include fastcgi.conf;
fastcgi_index index.php;
# fastcgi_intercept_errors on;
fastcgi_pass php;

fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;

fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 60m;
}
Finally add a location for conditional purge
location ~ /purge(/.*) {
# Uncomment the following two lines to allow purge only from the webserver
#allow 127.0.0.1;
#deny all;

fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}
If you get an 'unknown directive "fastcgi_cache_purge"' error check that your nginx installation has fastcgi_cache_purge module.
Better Performance for Static Files in Multisite By default, on a Multisite setup, a static file request brings php into picture i.e. ms-files.php file. You can get much better performance using Nginx Map{..} directive.
In nginx config for your site, above server{..} block, add a section as follows:
map $http_host $blogid {
default 0;

example.com 1;
site1.example.com 2;
site1.com 2;
}
It is just a list of site-names and blog-ids. You can use Nginx helper (http://wordpress.org/extend/plugins/nginx-helper) to get such a list of site-name/blog-id pairs. This plugin will also generate a map.conf file which you can directly include in the map{} section like this:
map $http_host $blogid {
default 0;

include /path/to/map.conf ;
} After creating a map{..} section, you just need to make one more change in your Nginx config so requests for /files/ will be first processed using nginx map{..}:
location ~ ^/files/(.*)$ {
try_files /wp-content/blogs.dir/$blogid/$uri /wp-includes/ms-files.php?file=$1 ;
access_log off; log_not_found off; expires max;
} Notes

Whenever a new site is created, deleted or an extra domain is mapped to an existing site, Nginx helper will update map.conf file automatically but you will still need to reload Nginx config manually. You can do that anytime later. Till then, only files for new sites will be served using php-fpm.
This method does not generate any symbolic links. So, there will be no issues with accidental deletes or backup scripts that follow symbolic links.
For large networks, this will scale-up nicely as there will be a single map.conf file.

Notes A couple of final but important notes: This whole setup assumes that the root of the site is the blog and that all files that will be referenced reside on the host. If you put the blog in a subdirectory such as /blog, then the rules will have to be modified. Perhaps someone can take these rules and make it possible to, for instance, use a:
set $wp_subdir "/blog";
directive in the main 'server' block and have it automagically apply to the generic WP rules.



- - - Updated - - -

http://www.webhostingtalk.ir/showthread.php?t=137737

hamed75
August 3rd, 2015, 04:13
تغییر دادم درست شد . فقط یعنی هیج راهی جهت درست کردن و استفاده از نام نداره
اینجور همه ایندکسهام حذف میشن و و. ...

mha1368
August 3rd, 2015, 05:52
محتویات .htaccess رو لطف کنید

الان nginx+اپاچی دارید یا nginx تنها؟

hamed75
August 3rd, 2015, 06:13
.htaccess رو بطور کلی حذف کردم
قبلا اپاچی بود بعدش من طبق یه اموزشی انجین ایکس رو نصبیدم

mha1368
August 3rd, 2015, 06:18
.htaccess رو بطور کلی حذف کردم
قبلا اپاچی بود بعدش من طبق یه اموزشی انجین ایکس رو نصبیدم


بک آپ ازش ندارید؟

خوب اگه همراه اپاچی هست که باید .htaccess رو بدون مشکل بخونه
اگه نیست باید .htaccess رو به انجینکس تبدیل کنید

hamed75
August 3rd, 2015, 06:21
وقتی اصلا همچین فایلی وجود نداره خوندن یا نخوندنش چه دردی دوا میکنه ؟

nginxweb
August 3rd, 2015, 09:48
درود
دوست عزیز مشکل فوف از عدم تعریف rule های مربوط به وردپرس در فایل کانغیگ nginx میباشد به همین دلیل url ها کار نمیکنند و فقط url هایی که آدرس مستقیم دارند کار خواهند کرد

emad.shabani
January 6th, 2016, 13:00
درود
دوست عزیز مشکل فوف از عدم تعریف rule های مربوط به وردپرس در فایل کانغیگ nginx میباشد به همین دلیل url ها کار نمیکنند و فقط url هایی که آدرس مستقیم دارند کار خواهند کرد

من هم مین مشکل رو دارم و کلافه شدم. راه حلش چیه

sazsaz
January 6th, 2016, 13:06
فایل htaccess را حذف کنید و بعد از ان از تنظیمات پیوند های یکتا بر روی نوشته قرار داده و ذخیره کنید موفق باشید

emad.shabani
January 6th, 2016, 13:11
فایل htaccess را حذف کنید و بعد از ان از تنظیمات پیوند های یکتا بر روی نوشته قرار داده و ذخیره کنید موفق باشید

نشد این کارو قبلا کرده بودم ظاهرا اون چیزی که آقای nginxweb (http://www.webhostingtalk.ir/member.php?u=69972) گفته باید انجام بشه (تعریف رولهای وردپرس)

klax0n
January 6th, 2016, 14:45
دوست عزیز باید توی کانفیگ nginx برای سایتتون rewrite رو تنظیم کرده باشید که کار کنه
فایل کانفیگتون رو قرار بدید که بشه نظر داد
برای کانفیگ هم از منابع آموزشی معتبر استفاده کنید مثل https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress
موفق باشید

emad.shabani
January 6th, 2016, 18:16
ممنون
کدوم فایل (کانفیگ) رو بذارم

klax0n
January 7th, 2016, 00:20
فایلی که تنظیمات nginx مربوط به سایت وردپرستون رو انجام دادید توش
احتمالا باید به شکل زیر باشه مسیرش:


/etc/nginx/conf/x.conf

emad.shabani
January 9th, 2016, 10:13
اون فایل که وجود نداشت. اینو گذاشتم: /etc/nginx/nginx.conf

#user nginx;

# The number of worker processes is changed automatically by CustomBuild, accord$
worker_processes 1;
pid /var/run/nginx.pid;

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

events {
include /etc/nginx/nginx-events.conf;
}


http {
include /etc/nginx/mime.types;

# For user configurations not maintained by DirectAdmin. Empty by default.
include /etc/nginx/nginx-includes.conf;

# Supplemental configuration
include /etc/nginx/nginx-modsecurity-enable.conf;
include /etc/nginx/nginx-defaults.conf;
include /etc/nginx/nginx-gzip.conf;
include /etc/nginx/directadmin-ips.conf;
include /etc/nginx/directadmin-settings.conf;
include /etc/nginx/nginx-vhosts.conf;
include /etc/nginx/directadmin-vhosts.conf;
}

اینا هم محتویات پوشه nginx هست:

directadmin-ips.conf nginx-info.conf
directadmin-settings.conf nginx_limits.conf
directadmin-vhosts.conf nginx-modsecurity.conf
directadmin-vhosts.conf.back nginx-modsecurity-enable.conf
fastcgi.conf nginx-userdir.conf
fastcgi.conf.default nginx-vhosts.conf
fastcgi_params scgi_params
fastcgi_params.default scgi_params.default
koi-utf ssl.crt
koi-win ssl.key
mime.types uwsgi_params
mime.types.default uwsgi_params.default
nginx.conf webapps.conf
nginx.conf.default webapps.hostname.conf
nginx-defaults.conf webapps_settings.conf
nginx-events.conf webapps.ssl.conf
nginx-gzip.conf win-utf
nginx-includes.conf