Title: Yet another permalink issue :-)
Last modified: March 27, 2020

---

# Yet another permalink issue :-)

 *  Resolved [fpiraneo](https://wordpress.org/support/users/fpiraneo/)
 * (@fpiraneo)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/yet-another-permalink-issue/)
 * Hi everybody,
    I’m new in WP but I’ve understand that many people has issues 
   with “pretty” permalinks. I’m one of the many! 😀 Hopefully I had googled around
   and checked may things but the solution doesn’t came, so here to ask for help.
 * When I ran a “Site Health” I receive a warning about REST API doesn’t working–
   Unexpected result 404.
 * What I checked:
    – Running on debian 10 LAMP – apache2 rewrite module: Enabled;–
   WP dir writeable to “www-data” -> .htaccess is modified every time I change under“
   Settings-Permalinks”; plugins can install by themself without FTP access; – Everything
   works fine with “ugly” permalinks; when I enable “pretty” permalinks the issue
   appears; – Everything is last version – No updates underlined; – WP running a
   fresh install (v. 5.3.2); – No funny themes installed: just the defaults; – Plugins:
   bbPress, NinjaMotd, PolyLang, WP Cerber Security Antispam & Malware Scan, WP 
   Statistics.
 * In this situation the Gutemberg block editor run only with “ugly” permalinks.
 * Follows my apache2 configuration file.
 * Please note: I’m behind a NGINX reverse proxy (just one public IP, sorry!); follows
   also config file.
 * Any suggestion to check is strongly welcome!
 * Thank you very much!
 * Francesco
 *     ```
       <strong># apache2ctl -M</strong>
       Loaded Modules:
        core_module (static)
        so_module (static)
        watchdog_module (static)
        http_module (static)
        log_config_module (static)
        logio_module (static)
        version_module (static)
        unixd_module (static)
        access_compat_module (shared)
        alias_module (shared)
        auth_basic_module (shared)
        authn_core_module (shared)
        authn_file_module (shared)
        authz_core_module (shared)
        authz_host_module (shared)
        authz_user_module (shared)
        autoindex_module (shared)
        deflate_module (shared)
        dir_module (shared)
        env_module (shared)
        filter_module (shared)
        mime_module (shared)
        mpm_prefork_module (shared)
        negotiation_module (shared)
        php7_module (shared)
        reqtimeout_module (shared)
        rewrite_module (shared)
        setenvif_module (shared)
        status_module (shared)
       ```
   
 * **Apache2 site configuration file:**
    _On a linux container: This is the only
   website on this container_
 *     ```
       <VirtualHost *:80>
               ServerAdmin postmaster@mysite.ch
               DocumentRoot /var/www/www.mysite.ch/
   
               ErrorLog ${APACHE_LOG_DIR}/error.log
               CustomLog ${APACHE_LOG_DIR}/access.log combined
       </VirtualHost>
       ```
   
 * **NGINX proxy configuration file:**
 *     ```
       server {
         listen 443 ssl;
         server_name www.mysite.ch;
         ssl_certificate /etc/letsencrypt/live/mysite.ch/fullchain.pem;
         ssl_certificate_key /etc/letsencrypt/live/mysite.ch/privkey.pem;
   
         location / {
              gzip                    off;
   
              proxy_read_timeout      300;
              proxy_connect_timeout   300;
              proxy_redirect          off;
   
              proxy_set_header        Host                $http_host;
              proxy_set_header        X-Real-IP           $remote_addr;
              proxy_set_header        X-Forwarded-For     $proxy_add_x_forwarded_for;
              proxy_set_header        X-Forwarded-Proto   https;
              proxy_set_header        X-Frame-Options     SAMEORIGIN;
   
              proxy_pass http://192.168.1.159/; # This is the IP addr of the LXC where WP run
         }
       }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [fpiraneo](https://wordpress.org/support/users/fpiraneo/)
 * (@fpiraneo)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/yet-another-permalink-issue/#post-12592471)
 * More setup:
    **Generated `.htaccess` with “pretty” permalinks enabled** This 
   is the format I choose: `https://www.mysite.ch/sample-post/`
 *     ```
       # BEGIN WordPress
       # The directives (lines) between <code>BEGIN WordPress</code> and <code>END WordPress</code> are
       # dynamically generated, and should only be modified via WordPress filters.
       # Any changes to the directives between these markers will be overwritten.
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
   
       # END WordPress
       ```
   
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [6 years, 2 months ago](https://wordpress.org/support/topic/yet-another-permalink-issue/#post-12592473)
 * In your virtual host config files for both ports 443 and 80, add this:
 *     ```
       <Directory /var/www/www.mysite.ch>
         AllowOverride All
       </Directory>
       ```
   
 * then restart Apache.
 * The default is “None”, which causes the web server to ignore .htacess.
    -  This reply was modified 6 years, 2 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [fpiraneo](https://wordpress.org/support/users/fpiraneo/)
 * (@fpiraneo)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/yet-another-permalink-issue/#post-12592518)
 * [@sterndata](https://wordpress.org/support/users/sterndata/) Solved!!!
 * Thank you very much!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Yet another permalink issue :-)’ is closed to new replies.

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [fpiraneo](https://wordpress.org/support/users/fpiraneo/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/yet-another-permalink-issue/#post-12592518)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
