5
我必須爲每個網站配置一個專用證書的多https網站。它的工作正常。多「服務器」塊的相同「位置」規則
server {
listen 443;
server_name client1.localhost.eu;
ssl on;
ssl_certificate ...;
ssl_certificate_key ...;
root /var/www/client1;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm-client1.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
server {
listen 443;
server_name client2.localhost.eu;
ssl on;
ssl_certificate ...;
ssl_certificate_key ...;
root /var/www/client2;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm-client2.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
現在,我想分解「位置」塊,因爲它總是相同的。可能嗎 ? (我也試圖只在服務器塊上,但不可能把變量放在ssl屬性中)
非常感謝您的幫助。
埃裏克
喔,很簡單!感謝和sry爲這個noob問題:) – elhostis 2015-03-03 13:44:55