0
私はhttps://github.com/coryhouse/react-slingshotに反応するアプリベースを持っています。 私はそこにURLを持っています:/ about 私はこのURLに開発モードやローカルホスト上のプロダクション経由で直接行くとうまくいきます。 しかし、私はエラーを得たnginxの経由EC2インスタンスで:ここでReactJSアプリEC2ルータ404
404 Not Found
nginx/1.10.3 (Ubuntu)
は私のnginxのconfにある:
server {
listen 80;
server_name example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
root /home/ubuntu/www/example;
index index.html index.htm;
add_header Strict-Transport-Security "max-age=31536000";
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:AES256+ECDHE';
# Make site accessible from http://localhost/
server_name example.com;
location/{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
}
それを適切に設定する方法?ありがとう!