my.domainname.com/unity/index.html
“手动操作,就行了
和
当我尝试的时候”
my.domainname.com/unity/
(最重要的是最新的行,当用户想要访问
/unity
路径)
server {
listen *:443 ssl;
server_name "~^my\.domainname\..*$";
index index.html index.htm;
access_log /var/log/nginx/proxy-access.log proxylog;
error_log /var/log/nginx/proxy-error.log error;
ssl_certificate /var/lib/acme/live/my.domainname.com/fullchain;
ssl_certificate_key /var/lib/acme/live/my.domainname.com/privkey;
ssl_trusted_certificate /var/lib/acme/live/hive.battlesoop.fr/chain;
ssl_stapling on;
ssl_stapling_verify on;
location '/.well-known/acme-challenge' {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Server $host;
proxy_pass http://acmetool;
}
# Add CORS access to all = '*'
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
# unity
location ~* ^/unity(?<p>.*) {
root /web/htdocs/my.domainname.com/unity;
index index.html index.htm;
try_files /$p =403;
access_log off;
expires 1h;
}
}