Tag Info

Hot answers tagged

2

Don't use a separate location. In your configuration there are no fastcgi directives to handle the case where the user is not a bad_user, thus nginx treats it as a static file and serves it directly. Instead, put the check in your existing location ~ \.php$ block, and then check for login.php there. For example: location ~ \.php$ { if ($bad_user) { ...


2

Remove http:// from server_name config New config will be something like this server { listen 80; server_name hg.rawdatatech.com; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /static/ { alias /home/home-garden/staticfiles/; } }


2

systemd logs all messages (startup/stop) to /var/log/message using syslog, the errors line you see are basically all matching lines for "nginx" with tail option. Its something =~ grep nginx | tail which will display the last 10 lines of the /var/log/message for "nginx" grep. Basically systemctl displays last 10 lines from log to help user identify the ...


1

GoAccess says right on their page: Apache/Nginx Common/Combined + VHosts If your logs aren't parsing, then you'll need to look into the GoAccess logs and see what is wrong. Additionally: GoAccess allows any custom log format string. So you may need to look into how to instruct the tool on your custom format.


1

Nginx by default will output a combined log format (NCSA). GoAccess will automatically recognize it if you pick the first option from the configuration dialog (or permanently uncomment the NCSA Combined Log Format from your config file.) If you are interested to log the request time, then you need to modify your nginx config file and add your custom log ...


1

The init script, and specifically the helper start-stop-daemon, expects the program it starts to put itself in the background by default. However, someone has mistakenly altered your nginx configuration to prevent it from doing this: # Keeps the logs free of messages about not being able to bind(). daemon off; This section should be removed entirely. ...


1

This is happening because your daemon is only listening on IPv4. IPv6 is the default protocol, so if a given hostname has both IPv4 and IPv6 addresses, the IPv6 address is always tried first. In your case, localhost has the IPv4 address 127.0.0.1 and the IPv6 address ::1. But your daemon is only listening on 127.0.0.1. So, when nc tries to connect to ...


1

This question was correctly answered on stackoverflow by one of the authors of Passenger. Here's a copy of his answer. Restarting Nginx would actually make the log file come back. It's just that you're not using the right method to restart Nginx, because your Nginx install was installed from source. Init scripts, e.g. /etc/init.d/nginx and service nginx ...



Only top voted, non community-wiki answers of a minimum length are eligible