锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
<pre>
http {
: upstream myproject {
: server 127.0.0.1:8000 weight=3;
: server 127.0.0.1:8001;
: server 127.0.0.1:8002;
: server 127.0.0.1:8003;
: }
: server {
: listen 80;
: server_name www.domain.com;
: location / {
: proxy_pass http://myproject;
: }
: }
}
</pre>
----
[[Category:Homepage]]
openssl req -new -x509 -nodes -out eglic.crt -keyout eglic.key
澧炲姞涓涓櫄鎷熶富鏈?/code>
server {
listen 443;
ssl on;
ssl_certificate /opt/eglic.crt;
ssl_certificate_key /opt/eglic.key;
server_name www.eglic.com;
charset gb2312;
index index.php index.html index.htm;
root /var/www/eglic;
location / {
index index.php index.html index.htm;
rewrite ^/show-([0-9]+)-([0-9]+)\.html$ /index.php?action=show&id=$1&page=$2 last;
rewrite ^/category-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&cid=$1&page=$2 last;
rewrite ^/archives-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&setdate=$1&page=$2 last;
rewrite ^/(archives|search|reg|login|index|links)\.html$ /index.php?action=$1 last;
rewrite ^/(comments|tagslist|trackbacks|index)-([0-9]+)\.html$ /index.php?action=$1&page=$2 last;
}
location ~ .*\.php?$
{
fastcgi_pass 127.0.0.1:10086;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE eglic/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REDIRECT_STATUS 200;
}
}
鐜板湪鍙互閫氳繃 https://www.eglic.com/璁塊棶鎴戜簡錛?/code>