7
votes
Nginx displaying failed (13: Permission denied) when trying to access new site
A good way to debug such nginx errors is by checking the logs and using namei to check whether nginx has access to all ancestor folders.
Consider /static/vendor.js gives a HTTP 403 due to this ...
4
votes
How to block .git Folder serverwide on NGINX?
You might want to block all locations starting with a dot on any level, i.e. .env, .git, .htaccess, etc. and make it look like there is no such location at all instead of confirming its existence to ...
4
votes
Accepted
Apache GZIP for images - any reason?
Adding gzip compression (with default settings) to that particular file does make it slightly (± 1.7 percent) smaller when I compare the 1019174 bytes for the original file versus 1001991 bytes for ...
3
votes
Accepted
How can I troubleshoot an iptables rule that is preventing internet access from my server?
The default DROP policy in your ruleset affects the replies: your query was done, a reply was sent back from remote to your server, and then your server dropped this reply. Final result: no reply ...
3
votes
Traefik routing to two ports in one docker container
After some searching, I found that you need to explicitly name the services when there's more than one in a container.
version: "3"
services:
# The `proxy` service set up two entrypoints ...
2
votes
Lightweight HTTP to HTTPS redirect
Since @symcbean mentioned using systemd sockets instead of xinetd, and I stumbled upon the same problem, I'll post my solution.
One needs to put two files in /etc/systemd/system.
This service, let's ...
2
votes
Accepted
Lightweight HTTP to HTTPS redirect
Minimal:
while true ; do nc -l -p 80 \
-c 'echo -e "HTTP/1.1 302 Moved Temporarily\nLocation: https://yourhost.example.com/\n\n"' ; done
although I'd run it via xinetd (and redirect to ...
2
votes
Accepted
What is the best way to redirect port 80 connections to port 8080 with ipv6?
Elsewhere on Server Fault (and other Stack Exchange sites) you can find more complete answers of options for low-numbered unprivileged ports.
For Linux, I prefer authbind, a hack where a setuid ...
2
votes
Accepted
Is it better to redirect root to www or www to root?
The www. prefix is a remnant from the glorious old 90s when you had a single machine for each service, like FTP, WWW, SMTP etc. and had to use a separate hostname for each one. The apex/bare domain ...
2
votes
Accepted
Can I use my letsencrypt wildcard cert on BOTH my webserver and DoH server?
From the unbound documentation...
Enabling DoH in Unbound is as simple as configuring the TLS
certificate and the corresponding private key that will be used for
the connection, and configuring ...
1
vote
How to assign different ipv6 for each domain in nginx?
Your PHP script does not determine the incoming IP address, it determines the IP address for outgoing connections.
Not tested, but you should be able to forward the variable $server_addr to php_fpm ...
1
vote
Nginx webserver not available with global IPv6 Address
A simple policy could be for a server to listen on the service port for any destination address. In nginx, unfortunately v6 is not the default if just given a port number. However can enable v6 with ...
1
vote
Accepted
Apache says certificate not valid for 192.168.0.44, but it is valid for 192.168.0.44
Your alt names is incorrect. It should be
[ alt_names ]
IP.1 = your_ip_address
By the way a certificate is never created for an ip adress and will never be trusted.
You can create a certificate based ...
1
vote
Apache redirect http://%{HTTP_HOST}:%{SERVER_PORT}/%{REQUEST_URI} to https://%{HTTP_HOST}%{REQUEST_URI}
If the Redirect directive is used within a <Location> or <LocationMatch> section with the URL-path omitted, then the URL parameter will be interpreted using expression syntax.
This syntax ...
1
vote
PHP mail.add_x_header not showing in log
EDIT: If I look at the mail headers I receive, I see the X-PHP-Originating-Script: line in there. Perhaps I've misunderstood - is that all the php.ini directive does?
Yes. As indicated by the fact ...
1
vote
Point many domains to a single simple web form, using nothing but domain records configuration
Now he and me both have websites and webhosting from a reseller party. So we have that available. But there does not seem to be a configuration option to have a 'catch-all domain' website, or a ...
1
vote
Apache Httpd: Logging Access for Non-privileged Users
Is it common to restrict access to /var/log/.... ?
Yes
Is it common to allow the owners of websites visibility of their logs?
Yes
Your issue is how to configure this so that Apache can write the logs, ...
1
vote
Apache Httpd: Logging Access for Non-privileged Users
There is no good reason IMHO to store the logs in a location that the webmaster cannot access. Since it looks like you already create specific logs for each VirtualHost, adjust where you store them to ...
1
vote
Online monitoring / dashboard service for multiple metrics
Many monitoring services support and provide agents to monitor all kinds of properties on your servers as well as custom checks for things/metrics they don't support natively already.
Install the ...
1
vote
Online monitoring / dashboard service for multiple metrics
Datadog monitors web availability, server performance, backup status. https://www.datadoghq.com/
1
vote
Server authorization based on token with expiration
To achieve the desired video streaming authorization method, you may need to implement a custom solution. One possible approach could be to generate a unique token for each user requesting access to ...
1
vote
Apache: Return static string for location
A better solution is to use mod_lua. This also obviates the need for mod_rewrite (which the httpd docs discourage). See https://gist.github.com/james2doyle/f09b0e159bb30836e593 for an example.
1
vote
How to view a log file realtime (similar to "tail -f") via web
What you are looking for is a real-time logs browser which is a piece of a simple software that either listens to files with logs or STDIN and prints it to the UI. Depending on the problem you're ...
1
vote
Nginx displaying failed (13: Permission denied) when trying to access new site
In my case, it was fixed (from this blog) by running the command: semanage permissive -a httpd_t and restarting NGINX service.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
web-server × 3319nginx × 558
apache-2.2 × 546
linux × 438
web-hosting × 210
ubuntu × 193
iis × 190
php × 189
security × 166
domain-name-system × 154
apache-2.4 × 129
http × 113
networking × 107
website × 104
ssl × 103
centos × 95
configuration × 93
reverse-proxy × 89
performance × 87
windows × 83
mysql × 74
load-balancing × 74
virtualhost × 71
iis-7 × 70
hosting × 67