我有一個A
Nginx上的名稱域設置,我在Digital Ocean上也有通配符DNS設置。Nginx Wild Card Domain
我想我的主要領域爲指向是:/usr/share/nginx/html/mission13.io
然後,我會像所有的通配符域指向其各自的文件夾:
/usr/share/nginx/html/sub1.mission13.io
/usr/share/nginx/html/sub2.mission13.io
/usr/share/nginx/html/sub3.mission13.io
這是我的,但我不知道該怎麼做才能讓他們指向正確的位置。我可以改變做什麼?
server{
listen 80;
root /usr/share/nginx/html/mission13.io;
index index.php index.html index.htm;
server_name mission13.io www.mission13.io *.mission13.io;
location/{
try_files $uri $uri/ /index.html;
}
include /usr/share/nginx/conf/mission13.io.conf;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
如何設置「Nginx上的名稱域設置」?請幫助 –