Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commands to log nginx from SSH in AWS EC2 #24

Open
behzodfaiziev opened this issue Sep 24, 2024 · 0 comments
Open

Add commands to log nginx from SSH in AWS EC2 #24

behzodfaiziev opened this issue Sep 24, 2024 · 0 comments

Comments

@behzodfaiziev
Copy link
Owner

Steps to View Real-Time Logs:

SSH into your EC2 instance: Make sure you're logged in via SSH.

ssh -i /path/to/your-key.pem ec2-user@your-ec2-ip

Use tail -f to follow the access log: You can follow new log entries as they appear using the following command:

tail -f /var/log/nginx/access.log

This will show the most recent log entries and keep updating the terminal with new requests as they come in.

Optionally follow the error log: If you want to follow errors in real-time, use:

tail -f /var/log/nginx/error.log

To stop the real-time log monitoring, press Ctrl + C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant