Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jeff
pleroma
Commits
56c49513
Verified
Commit
56c49513
authored
6 years ago
by
shibayashi
Browse files
Options
Downloads
Patches
Plain Diff
Use the server name as variable
parent
007f1c73
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
installation/caddyfile-pleroma.example
+1
-1
1 addition, 1 deletion
installation/caddyfile-pleroma.example
installation/pleroma-apache.conf
+11
-9
11 additions, 9 deletions
installation/pleroma-apache.conf
installation/pleroma.nginx
+6
-6
6 additions, 6 deletions
installation/pleroma.nginx
with
18 additions
and
16 deletions
installation/caddyfile-pleroma.example
+
1
−
1
View file @
56c49513
...
...
@@ -22,7 +22,7 @@ social.domain.tld {
Referrer-Policy "same-origin"
Strict-Transport-Security "max-age=31536000; includeSubDomains;"
Expect-CT "enforce, max-age=2592000"
Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://
social.domain.tld
; upgrade-insecure-requests;"
Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://
{host}
; upgrade-insecure-requests;"
}
# If you do not want remote frontends to be able to access your Pleroma backend server, remove these lines.
...
...
This diff is collapsed.
Click to expand it.
installation/pleroma-apache.conf
+
11
−
9
View file @
56c49513
#Example configuration for when Apache httpd and Pleroma are on the same host.
#Needed modules: headers proxy proxy_http proxy_wstunnel rewrite ssl
#Needed modules:
define
headers proxy proxy_http proxy_wstunnel rewrite ssl
#This assumes a Debian style Apache config. Put this in /etc/apache2/sites-available
#Install your TLS certificate, possibly using Let's Encrypt.
#Replace 'pleroma.example.com' with your instance's domain wherever it appears
ServerName
pleroma
.
example
.
com
Define
servername
pleroma
.
example
.
com
ServerName
${
servername
}
ServerTokens
Prod
ErrorLog
${
APACHE_LOG_DIR
}/
error
.
log
CustomLog
${
APACHE_LOG_DIR
}/
access
.
log
combined
<
VirtualHost
*:
80
>
Redirect
permanent
/
https
://
pleroma
.
example
.
com
Redirect
permanent
/
https
://
${
servername
}
</
VirtualHost
>
<
VirtualHost
*:
443
>
SSLEngine
on
SSLCertificateFile
/
etc
/
letsencrypt
/
live
/
pleroma
.
example
.
com
/
cert
.
pem
SSLCertificateKeyFile
/
etc
/
letsencrypt
/
live
/
pleroma
.
example
.
com
/
privkey
.
pem
SSLCertificateChainFile
/
etc
/
letsencrypt
/
live
/
pleroma
.
example
.
com
/
fullchain
.
pem
SSLCertificateFile
/
etc
/
letsencrypt
/
live
/
${
servername
}
/
cert
.
pem
SSLCertificateKeyFile
/
etc
/
letsencrypt
/
live
/
${
servername
}
/
privkey
.
pem
SSLCertificateChainFile
/
etc
/
letsencrypt
/
live
/
${
servername
}
/
fullchain
.
pem
# Mozilla modern configuration, tweak to your needs
SSLProtocol
all
-
SSLv3
-
TLSv1
-
TLSv1
.
1
...
...
@@ -31,7 +33,7 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined
Header
always
set
X
-
Frame
-
Options
"DENY"
Header
always
set
X
-
Content
-
Type
-
Options
"nosniff"
Header
always
set
Referrer
-
Policy
same
-
origin
Header
always
set
Content
-
Security
-
Policy
"default-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://
pleroma.example.tld
; upgrade-insecure-requests;"
Header
always
set
Content
-
Security
-
Policy
"default-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://
${servername}
; upgrade-insecure-requests;"
# Uncomment this only after you get HTTPS working.
# Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
...
...
@@ -45,7 +47,7 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPass
/
http
://
localhost
:
4000
/
ProxyPassReverse
/
http
://
localhost
:
4000
/
RequestHeader
set
Host
"pleroma.example.com"
RequestHeader
set
Host
${
servername
}
ProxyPreserveHost
On
</
VirtualHost
>
...
...
@@ -53,4 +55,4 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLUseStapling
on
SSLStaplingResponderTimeout
5
SSLStaplingReturnResponderErrors
off
SSLStaplingCache
shmcb
:/
var
/
run
/
ocsp
(
128000
)
\ No newline at end of file
SSLStaplingCache
shmcb
:/
var
/
run
/
ocsp
(
128000
)
This diff is collapsed.
Click to expand it.
installation/pleroma.nginx
+
6
−
6
View file @
56c49513
...
...
@@ -31,9 +31,9 @@ server {
listen 443 ssl http2;
ssl_session_timeout 5m;
ssl_trusted_certificate /etc/letsencrypt/live/
example.tld
/fullchain.pem;
ssl_certificate /etc/letsencrypt/live/
example.tld
/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/
example.tld
/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/
$server_name
/fullchain.pem;
ssl_certificate /etc/letsencrypt/live/
$server_name
/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/
$server_name
/privkey.pem;
# Add TLSv1.0 to support older devices
ssl_protocols TLSv1.2;
...
...
@@ -46,7 +46,7 @@ server {
ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1;
ssl_stapling on;
ssl_stapling_verify on;
server_name example.tld;
gzip_vary on;
...
...
@@ -77,8 +77,8 @@ server {
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "same-origin" always;
add_header X-Download-Options "noopen" always;
add_header Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action *; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://
example.tld
; upgrade-insecure-requests;" always;
add_header Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action *; frame-ancestors 'none'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://
$server_name
; upgrade-insecure-requests;" always;
# Uncomment this only after you get HTTPS working.
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment