Nginx config:修订间差异

来自WHY42
Riguz留言 | 贡献
创建页面,内容为“ =Configuration= ==Serve React== ==Reverse proxy== Category:Linux/Unix
 
Riguz留言 | 贡献
标签2017版源代码编辑
第2行: 第2行:
=Configuration=
=Configuration=
==Serve React==
==Serve React==
Note:


* Solve browser route 404:<ref>https://stackoverflow.com/questions/45598779/react-router-browserrouter-leads-to-404-not-found-nginx-error-when-going-to</ref>
<syntaxhighlight lang="nginx">
server {
    root /var/www/html;
    server_name yai.ink;
    location / {
        try_files $uri $uri/ /index.html;
    }
}
</syntaxhighlight>


==Reverse proxy==
==Reverse proxy==


[[Category:Linux/Unix]]
[[Category:Linux/Unix]]

2024年12月7日 (六) 02:36的版本

Configuration

Serve React

Note:

  • Solve browser route 404:[1]
server {
    root /var/www/html;
    server_name yai.ink;

    location / {
        try_files $uri $uri/ /index.html;
    }
}

Reverse proxy