Привет, Есть домен: http://example.com
Нужно сделать несколько независимых сайтов на WordPress. URL должны быть вида: http://example.com/tiger http://example.com/lynx http://example.com/lion По каждой ссылке будет установлен WordPress. Для начала не могу понять что писать в server_name для каждого из сайтов и как вообще их разграничить. На данный момент есть такой конфиг: server { listen 80; server_name example.com; rewrite ^(.*) http://www.example.com$1 permanent; } server { listen 80; server_name www.example.com; client_max_body_size 5m; client_body_timeout 60; access_log /var/log/nginx/my-wordpress.com-access; error_log /var/log/nginx/my-wordpress.com-error error; root /var/www/html/my-wordpress.com/; index index.html index.php; ### root directory ### location / { try_files $uri $uri/ /index.php?$args; } ### security ### error_page 403 =404; location ~ /\. { access_log off; log_not_found off; deny all; } location ~ ~$ { access_log off; log_not_found off; deny all; } location ~* wp-admin/includes { deny all; } location ~* wp-includes/theme-compat/ { deny all; } location ~* wp-includes/js/tinymce/langs/.*\.php { deny all; } location /wp-includes/ { internal; } #location ~* wp-config.php { deny all; } location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php)$ { types { } default_type text/plain; } # location ~* wp-admin { # allow <YOUR_IP>; # allow 127.0.0.1; # deny all; # } ### disable logging ### location = /robots.txt { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } ### caches ### location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ { access_log off; expires max; } location ~* \.(woff|svg)$ { access_log off; log_not_found off; expires 30d; } location ~* \.(js)$ { access_log off; log_not_found off; expires 7d; } ### php block ### location ~ \.php?$ { try_files $uri =404; include fastcgi_params; #fastcgi_pass 127.0.0.1:9001; fastcgi_pass unix:/var/run/php-wordpress.socket; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; fastcgi_split_path_info ^(.+\.php)(.*)$; #Prevent version info leakage fastcgi_hide_header X-Powered-By; } } Posted at Nginx Forum: http://forum.nginx.org/read.php?21,244522,244522#msg-244522 _______________________________________________ nginx-ru mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-ru
