Configure Drupal pseudo-static on Nginx on the aliyun host, nginxdrupal
Online looking for a long time is not correct, the back directly in http://wiki.nginx.org/Drupal
The original text is found, but a 'root' rewrite ctictive is duplicate error and the first server column error will appear after the original text is copied.
Compared with the pre-configured rewrite on aliyun, it is found that none of them have the server {} name, and this location also reports an error in nginx-t.
Commented out the error location and deleted the configuration that is not applicable to drupal 7.
- /Alidata/server/nginx/sbin/nginx-t
Use this test when setting.
Finally, set the conf file and restart it.
- /Alidata/server/nginx/sbin/nginx-s reload
With the original configuration:
server_name domain.tld; #root /var/www/drupal7; ## <-- Your only path reference. # Enable compression, this will help if you have for instance advagg module # by serving Gzip versions of the files. gzip_static on; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } # This matters if you use drush prior to 5.x # After 5.x backups are stored outside the Drupal install. #location = /backup { # deny all; #} # Very rarely should these ever be accessed outside of your lan location ~* \.(txt|log)$ { allow 192.168.0.0/16; deny all; } location ~ \..*/.*\.php$ { return 403; } # No no for private location ~ ^/sites/.*/private/ { return 403; } # Block access to "hidden" files and directories whose names begin with a # period. This includes directories used by version control systems such # as Subversion or Git to store control files. location ~ (^|/)\. { return 403; } location / { # This is cool because no php is touched for static content try_files $uri @rewrite; } location @rewrite { # You have 2 options here # For D7 and above: # Clean URLs are handled in drupal_environment_initialize(). rewrite ^ /index.php; # For Drupal 6 and bwlow: # Some modules enforce no slash (/) at the end of the URL # Else this rewrite block wouldn't be needed (GlobalRedirect) #rewrite ^/(.*)$ /index.php?q=$1; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_intercept_errors on; fastcgi_pass unix:/tmp/phpfpm.sock; } # Fighting with Styles? This little gem is amazing. # This is for D6 #location ~ ^/sites/.*/files/imagecache/ { # This is for D7 and D8 location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; }}
Website Domain Name Space Server
A space is a computer. It can be any computer on the Internet. If you have applied for a VM space, you will usually be given a fixed public ip address and then find a dns server to bind the ip address to the domain name. The requested domain name website must also be bound to the server (Virtual Machine space) ip address. This is called domain name resolution. The same ip address can be bound to several domain names, but one domain name cannot be bound to several ip addresses. You can apply for two virtual hosts to place your website code separately. These are the two websites. Ask me again if you don't know.
VPS with 3 m exclusive bandwidth can withstand IP addresses in the lnmp Environment
It also depends on your website program, files that have been browsed by these ip addresses, and text files of the video class...
And your cpu. Finally, check whether your bandwidth resources are junk or stable.
Sunshine Internet cloud vps free trial
Free Record Filing assistance
You can add id