• Resolved llopera

    (@llopera)


    Hello,

    I have installed a WP site on a Ubuntu 18.04 machine. This machine runs behind an Apache reverse proxy. The page at this moment is a barebone installation (No plugins). I can access and admin the site without problems. However, the following tasks, do not complete and do not produce any errors.

    * Creating tags or categories in the management interface, the browser’s network monitor reports a POST to admin-ajax.php but stays pending. Creating tags or categories from the post editor works.

    * Importing WordPress XML triggers a post to admin.php, and again nothing happens.

    * Using the multi-file uploader also does not work. Using single file uploads works without problems.

    NGINX config of internal server

    
    server {
        listen 80;
        listen [::]:80;
        server_name diettech.org;
    
    # disable_symlinks on from=$document_root;
    
         root /var/www/html/wordpress_5.2;
         index index.php;
    
         access_log /var/www/html/logs/access.log;
         error_log /var/www/html/logs/error.log;
    
    location / {
         try_files $uri $uri/ /index.php?$args;
         # try_files \$uri \$uri/ =404;
    }
    
    location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            include fastcgi_params;
    }
    
    location ~ /\.ht {
                    deny all;
            }
    }
    

    # Apache config of public server

    
    <VirtualHost *:80>
        ServerName diettech.org
        ServerAdmin webmaster@localhost
        ProxyRequests Off  
        <Location "/">
                ProxyPass   "https://internal/"
                ProxyPassReverse "https://internal/"
                ProxyPreserveHost on
                Require all  granted
        </Location>
    
        Loglevel info
        ErrorLog /var/log/apache2/diettech_error.log
        CustomLog /var/log/apache2/diettech_access.log combined
        
    </VirtualHost>
    

    I’ve tried with different configurations found online but always the same problems. Apparently there no access reported to the servers logs.

    I’ve set up WordPress in Debug mode, but I am also not catching any errors.

    Thank you in advance for any pointers.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • My thoughts…

    You’re using these backwards from what I normally see. WordPress itself likes htaccess which doesn’t exist on Nginx (correct me if I’m wrong) so I’d be running the origin on Apache. But, I’m very comfortable on Apache so you might be on the better track.

    Nginx makes a great proxy server… I’d let my Nginx server serve to the world. But I’ve been told Apache makes a great proxy box, too.

    To figure out my immediate problem, I’d eliminate the proxy and get my WordPress running flawlessly (regardless of the server) and then reintroduce the proxy out front.

    WordPress will run on Nginx from what I’ve heard. It will run on IIS, too, according to rumors. Lightspeed will run WordPress I think but I’m not even sure what Lightspeed is.

    Thread Starter llopera

    (@llopera)

    Thank you!

    So I started from a working configuration without the proxy, after introducing the proxy, things started to break.

    I also tried with Apache as the internal web server and the result was the same.

    What I find very weird is that some POST requests do go through, I can write post and pages, and even the admin-ajax.php watchdog returns without problems. Only in those specific tasks, the request seems to be lost in limbo.

    Thread Starter llopera

    (@llopera)

    Ok, it turned out that something between my computer and the head server was filtering POST requests with wp-admin and post_type[s] anywhere on the request.

    Solution: move to https

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘partial problems with WP behind reverse proxy’ is closed to new replies.