WordPress.org

Ready to get started?Download WordPress

Forums

ProxyPass (5 posts)

  1. sam.wootton
    Member
    Posted 4 years ago #

    Hi,

    I installed wordpress on opensuse, running apache2 - no problems.

    I saw it when i hit http://www.mydomain.com/wordpress.

    I wish to just hit http://www.mydomain.com (without /wordpress). So i use ProxyPass mod for apache2:

    ProxyPass / http://www.mydomain.com/wordpress

    ...inside my virtual host directive.

    When i hit http://www.mydomain.com, it just hangs - never loads, and i see (in the access logs of apache2):

    GET /wordpress/error/HTTP_BAD_GATEWAY.html.var HTTP/1.1" 404 1041

    Its as if once i forward via the proxy - that wordpress is trying to retrieve from a non-relative URL (or something?).

    Can wordpress be used with a proxy pass in this way? Or is it forever stuck in "/wordpress"? What does wordpress do when it returns content / queries files / db's, etc? What are the URLS?

    Please, please - any help, appreciated!

    Regards, Sam

  2. ClaytonJames
    Member
    Posted 4 years ago #

    Why not just install wordpress at the root and get rid of the "wordpress" directory? Or follow the directions for serving wordpress from root while maintaining it in it's own directory?

    Giving WordPress its Own Directory While Leaving Your Blog in the Root Directory

  3. sam.wootton
    Member
    Posted 4 years ago #

    Hi,

    Or follow the directions for serving wordpress from root while maintaining it in it's own directory?

    Thats what i am currently doing. That IS the problem. Because whilst it works for the initial redirection (from initial HTTP request), it doesn't work for admin pages etc (the inner workings of wordpress when it retrieves files).

    Your first suggestion:

    Why not just install wordpress at the root and get rid of the "wordpress" directory?

    .. because all software like this (joomla is another example) should stay under the parent directory, and not start moving outside it - for 2 reasons, firstly for portability (if i want to move it, or change system on my webserver, i need to only move 1 dir), secondly, i have no idea whether messing with dir tructure of wordpress will effect its behaviour.

    What i need is something like the mod_proxy_html, described here:

    http://linux.wareseeker.com/Internet/mod-proxy-html-2.5.1.zip/319259

    I have managed to get it working, by setting the DocumentRoot directive to the serverRoot/wordpress/. However, this then creates the same problem in reverse (where admin stuff expects 'wordpress' when it is no longer needed). So i use a ProxyPass the other way around:

    ProxyPass /wordpress /

    to redirect to root.

    But this is not the way i want it. Any ideas? Has no one had this problem of ProxyPass and wordpress root before?

    Sam

  4. *blink* You are trying to force the admin pages to be in the root when they firmly believe they are in /wordpress/...

    That's way too complicated. As you've already done, keep it in the /wordpress/ directory but move the DocumentRoot /srv/www/htdocs to /srv/www/htdocs/wordpress.

    It's not a ProxyPass/WordPress problem, you're making this to complicated.

    Update your WordPress location via http://codex.wordpress.org/Moving_WordPress. Make sure you backup your database and files prior to the move as a just in case.

  5. ClaytonJames
    Member
    Posted 4 years ago #

    Double *blink* and Amen, jdembowski.

    :-)

Topic Closed

This topic has been closed to new replies.

About this Topic