This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:selfhostedwp [2025/10/29 22:38] – oemb1905 | computing:selfhostedwp [2026/04/12 15:53] (current) – oemb1905 | ||
|---|---|---|---|
| Line 140: | Line 140: | ||
| After isntalling memcached and enabling those modules, navigate to your web root and adjust your .htaccess as follows: | After isntalling memcached and enabling those modules, navigate to your web root and adjust your .htaccess as follows: | ||
| - | | + | < |
| - | ExpiresActive On | + | < |
| - | ExpiresByType image/jpg " | + | ExpiresActive On |
| - | ExpiresByType image/jpeg " | + | ExpiresByType image/jpg " |
| - | ExpiresByType image/gif " | + | ExpiresByType image/jpeg " |
| - | ExpiresByType image/png " | + | ExpiresByType image/gif " |
| - | ExpiresByType text/css " | + | ExpiresByType image/png " |
| - | ExpiresByType text/html " | + | ExpiresByType text/css " |
| - | ExpiresByType text/ | + | ExpiresByType text/html " |
| - | ExpiresDefault " | + | ExpiresByType text/ |
| - | </ | + | ExpiresDefault " |
| + | </ | ||
| + | </code> | ||
| - | | + | < |
| - | RewriteEngine On | + | < |
| - | RewriteRule .* - [E=HTTP_AUTHORIZATION: | + | RewriteEngine On |
| - | RewriteBase / | + | RewriteRule .* - [E=HTTP_AUTHORIZATION: |
| - | RewriteRule ^index\.php$ - [L] | + | RewriteBase / |
| - | RewriteCond %{REQUEST_FILENAME} !-f | + | RewriteRule ^index\.php$ - [L] |
| - | RewriteCond %{REQUEST_FILENAME} !-d | + | RewriteCond %{REQUEST_FILENAME} !-f |
| - | RewriteRule . /index.php [L] | + | RewriteCond %{REQUEST_FILENAME} !-d |
| - | < | + | RewriteRule . /index.php [L] |
| - | Header set Timing-Allow-Origin " | + | < |
| - | </ | + | Header set Timing-Allow-Origin " |
| - | </ | + | </ |
| + | </ | ||
| + | </code> | ||
| - | | + | < |
| - | Header always set X-Content-Type-Options " | + | < |
| - | < | + | # X-origin core security headers |
| - | SetEnvIf Origin | + | |
| - | </ | + | |
| - | | + | Header |
| - | Header set Access-Control-Allow-Credentials | + | # HSTS |
| - | < | + | |
| - | Header set X-Frame-Options | + | # Feature Policy |
| - | Header set X-XSS-Protection | + | Header always set Permissions-Policy |
| - | Header set X-Download-Options " | + | # Cross Origin Openerand Embedder policies permissive for Gutenberg/ |
| - | Header set X-Permitted-Cross-Domain-Policies " | + | |
| - | | + | Header |
| - | | + | # Cache and download protections; |
| - | | + | < |
| - | | + | |
| - | Header set Strict-Transport-Security "max-age=0" | + | Header set X-Permitted-Cross-Domain-Policies " |
| - | | + | Header set Pragma " |
| - | | + | Header set Cache-Control "no-store, no-cache, must-revalidate, |
| - | | + | </ |
| - | | + | # Safe CSP for WordPress + Gutenberg |
| - | | + | < |
| - | | + | Header set Content-Security-Policy " |
| - | | + | |
| - | </ | + | |
| - | </ | + | img-src ' |
| + | font-src ' | ||
| + | connect-src ' | ||
| + | frame-src ' | ||
| + | media-src ' | ||
| + | object-src | ||
| + | base-uri | ||
| + | form-action | ||
| + | upgrade-insecure-requests; | ||
| + | </ | ||
| + | </ | ||
| + | </code> | ||
| I was getting a stubborn TLS redirect error for images. To address this, I went into ''/ | I was getting a stubborn TLS redirect error for images. To address this, I went into ''/ | ||
| Line 226: | Line 241: | ||
| Refresh WordPress and it should see the sftp server and allow you to make changes that way. Note: The sftp server is public and anyone can access this with proper credentials even if it not for WordPress so use a proper password and make sure your TLS configuration is working. Your instance should now be pretty solid. The only other thing you might want is more than one WordPress site subdomain, for example, site1.cooldomain.com, | Refresh WordPress and it should see the sftp server and allow you to make changes that way. Note: The sftp server is public and anyone can access this with proper credentials even if it not for WordPress so use a proper password and make sure your TLS configuration is working. Your instance should now be pretty solid. The only other thing you might want is more than one WordPress site subdomain, for example, site1.cooldomain.com, | ||
| - | --- // | + | --- // |