Compare commits

..

3 Commits

Author SHA1 Message Date
Ivan Gabaldon
fc0d485feb Merge cf3b060f31 into a899b72a50 2025-01-03 15:15:45 +01:00
(root@itachi)-[~]
a899b72a50 Updated version of "Start SearXNG with systemd"
* Update: grammatical correctness in README.md

* Update:  grammatical accuracy on README.md

* Update: enhance readability and include proper syntax highlighting for the commands under "Start SearXNG with systemd" in README.md

Update: enhance readability and include proper syntax highlighting for the commands under "Start SearXNG with systemd" in README.md

Update README.md

Update README.md

Update README.md

Update: enhance readability and included proper syntax highlighting for the commands under "Start SearXNG with systemd" in README.md

Update: Space Fix!

Update: Space Fixing in cp command
2025-01-03 15:15:03 +01:00
Ivan Gabaldon
cf3b060f31 merge upstream changes 2025-01-03 14:59:40 +01:00
2 changed files with 36 additions and 21 deletions

View File

@@ -33,20 +33,21 @@ encode zstd gzip
path /stats/checker
}
@static {
path /static/*
@search {
path /search
}
@imageproxy {
path /image_proxy
}
header {
# Force clients to use HTTPS
Strict-Transport-Security "max-age=31536000"
@static {
path /static/*
}
# Prevent MIME type sniffing from the declared Content-Type
X-Content-Type-Options "nosniff"
header {
# CSP (https://content-security-policy.com)
Content-Security-Policy "upgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self' https://github.com/searxng/searxng/issues/new; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self' https://overpass-api.de; img-src * data:; frame-src https://www.youtube-nocookie.com https://player.vimeo.com https://www.dailymotion.com https://www.deezer.com https://www.mixcloud.com https://w.soundcloud.com https://embed.spotify.com;"
# Disable some browser features
Permissions-Policy "accelerometer=(),camera=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),payment=(),usb=()"
@@ -54,6 +55,12 @@ header {
# Set referrer policy
Referrer-Policy "no-referrer"
# Force clients to use HTTPS
Strict-Transport-Security "max-age=31536000"
# Prevent MIME type sniffing from the declared Content-Type
X-Content-Type-Options "nosniff"
# X-Robots-Tag (comment to allow site indexing)
X-Robots-Tag "noindex, noarchive, nofollow"
@@ -67,13 +74,11 @@ header @api {
}
route {
# Caching
header Cache-Control "no-cache, no-store"
header @static Cache-Control "public, max-age=31536000"
# CSP (https://content-security-policy.com)
header Content-Security-Policy "upgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self' https://github.com/searxng/searxng/issues/new; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self' https://overpass-api.de; img-src 'self' data: https://*.tile.openstreetmap.org; frame-src https://www.youtube-nocookie.com https://player.vimeo.com https://www.dailymotion.com https://www.deezer.com https://www.mixcloud.com https://w.soundcloud.com https://embed.spotify.com"
header @imageproxy Content-Security-Policy "default-src 'none'; img-src 'self' data:"
# Cache policy
header Cache-Control "max-age=0, no-store"
header @search Cache-Control "max-age=5, private"
header @imageproxy Cache-Control "max-age=604800, public"
header @static Cache-Control "max-age=31536000, public, immutable"
}
# SearXNG (uWSGI)

View File

@@ -61,14 +61,24 @@ To access the logs of one specific container:
### Start SearXNG with systemd
You can skip this step if you don't use systemd.
1. Copy the service template file:
```sh
cp searxng-docker.service.template searxng-docker.service
```
2. Edit the content of ```WorkingDirectory``` in the ```searxng-docker.service``` file (only if the installation path is different from ```/usr/local/searxng-docker```)
3. Enable the service:
```sh
systemctl enable $(pwd)/searxng-docker.service
```
- ```cp searxng-docker.service.template searxng-docker.service```
- edit the content of ```WorkingDirectory``` in the ```searxng-docker.service``` file (only if the installation path is different from /usr/local/searxng-docker)
- Install the systemd unit:
```sh
systemctl enable $(pwd)/searxng-docker.service
systemctl start searxng-docker.service
```
4. Start the service:
```sh
systemctl start searxng-docker.service
```
**Note:** Ensure the service file path matches your installation directory before enabling it.
## Note on the image proxy feature