freshrss/edge/docs/en/admins

10_ServerConfig
Edited: Tuesday 15 September 2026

Apache/Nginx configuration files

ℹ️ For improved security, remove sensitive information in the Web server logs by using our sensitive-log.sh script,
on the model of our reference Apache configuration used for our official Docker images
(see CustomLog).

Apache configuration

This is an example Apache virtual hosts configuration file. It covers HTTP and HTTPS configuration.
For more details, check our reference Apache configuration used for our official Docker images.

 1<VirtualHost *:80>
 2	DocumentRoot /var/www/html/
 3
 4	#Default site...
 5
 6	ErrorLog ${APACHE_LOG_DIR}/error.default.log
 7	CustomLog ${APACHE_LOG_DIR}/access.default.log vhost_combined
 8</VirtualHost>
 9
10<VirtualHost *:80>
11	ServerName rss.example.net
12	DocumentRoot /path/to/FreshRSS/p/
13
14	<Directory /path/to/FreshRSS/p>
15		AllowOverride AuthConfig FileInfo Indexes Limit
16		Require all granted
17	</Directory>
18
19	ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
20	# Consider piping the logs for cleaning passwords; cf. comment higher up.
21	CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
22
23	AllowEncodedSlashes On
24</VirtualHost>
25
26<IfModule mod_ssl.c>
27	<VirtualHost *:443>
28		ServerName rss.example.net
29		DocumentRoot /path/to/FreshRSS/p/
30
31		<Directory /path/to/FreshRSS/p>
32			AllowOverride AuthConfig FileInfo Indexes Limit
33			Require all granted
34		</Directory>
35
36		ErrorLog ${APACHE_LOG_DIR}/freshrss_error.log
37		CustomLog ${APACHE_LOG_DIR}/freshrss_access.log combined
38
39		<IfModule mod_http2.c>
40			Protocols h2 http/1.1
41		</IfModule>
42
43		# For the API
44		AllowEncodedSlashes On
45
46		SSLEngine on
47		SSLCompression off
48		SSLCertificateFile /path/to/server.crt
49		SSLCertificateKeyFile /path/to/server.key
50		# Additional SSL configuration, e.g. with LetsEncrypt
51	</VirtualHost>
52</IfModule>

Nginx configuration

This is an example nginx configuration file. It covers HTTP, HTTPS, and php-fpm configuration.

You can find simpler config file but they may be incompatible with FreshRSS API.

 1server {
 2	listen 80;
 3	listen 443 ssl;
 4
 5	# HTTPS configuration
 6	ssl on;
 7	ssl_certificate /etc/nginx/server.crt;
 8	ssl_certificate_key /etc/nginx/server.key;
 9
10	# your server’s URL(s)
11	server_name rss.example.net;
12
13	# the folder p of your FreshRSS installation
14	root /srv/FreshRSS/p/;
15
16	index index.php index.html index.htm;
17
18	# nginx log files
19	access_log /var/log/nginx/rss.access.log;
20	error_log /var/log/nginx/rss.error.log;
21
22	# php files handling
23	# this regex is mandatory because of the API
24	location ~ ^.+?\.php(/.*)?$ {
25		fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
26		fastcgi_split_path_info ^(.+\.php)(/.*)$;
27		# By default, the variable PATH_INFO is not set under PHP-FPM
28		# But FreshRSS APIs greader.php and misc.php need it. If you have a “Bad Request” error, double check this var!
29		# NOTE: the separate $path_info variable is required. For more details, see:
30		# https://trac.nginx.org/nginx/ticket/321
31		set $path_info $fastcgi_path_info;
32		fastcgi_param PATH_INFO $path_info;
33		include fastcgi_params;
34		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
35	}
36
37	location / {
38		try_files $uri $uri/ index.php;
39	}
40}

Security

Avoid overwriting the Content-Security-Policy header with directives such as more_set_headers "Content-Security-Policy: ..." or add_header 'Content-Security-Policy' '...'.

✅ Example of good CSP: default-src 'self'; frame-ancestors 'self'

❌ Bad CSP: upgrade-insecure-requests

Debug your own CSP header:

If you’re aware of the risks and want to ignore the warning shown to admin users, change the suppress_csp_warning setting to true in ./data/config.php.

Note that FreshRSS already ships with a secure CSP configuration, therefore it’s not necessary to make any adjustments to CSP unless you’re writing an extension.

For that, look into the Minz_ActionController::_csp function and use it in individual actions.