I am setting up my ec2 machine on AWS and when I change server_name from x.xxx.xx.xxx
to ec2-x-xxx-xx-xxx.eu-central-1.compute.amazonaws.com
, and run
sudo service nginx restart
it gives me
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
The nginx sites-enabled file
server {
listen 80;
server_name ec2-xx-xxx-xxx-xxx.eu-central-1.compute.amazonaws.com;
access_log /var/log/nginx/example.log;
location / {
proxy_pass http://127.0.0.1:8000;
}
}
What can I try to resolve this?