[wp-trac] [WordPress Trac] #46136: WordPress install impossible when using symlinks in apache vhost

WordPress Trac noreply at wordpress.org
Tue Jan 29 16:08:58 UTC 2019


#46136: WordPress install impossible when using symlinks in apache vhost
-----------------------------+-----------------------------
 Reporter:  bracol           |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  5.0.3
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Hello.

 Fresh install here. As always, in let's say `/var/www`, I creating
 directories for my apps. I like to have my apache virtualhost pointed on
 symlinks, so when I have to swap version, I don't have to restart apache
 (only have to edit symlinks).

 For instance, let's say I have:

 {{{
 /var/www/myblog_all
 /var/www/myblog_all/myblog_wordpress
 /var/www/myblog_all/myblog_spip
 /var/www/myblog -> /var/www/myblog_all/myblog_wordpress/
 }}}
 (last line is symlink)

 In apache, I have :

 {{{
 ServerName myblog.com
 DocumentRoot /var/www/myblog
 }}}

 Well, in that case, I cannot install wordpress when acceding to the URL
 `http://myblog.com`. I'm redirected to
 `http://myblog.com_all/myblog_wordpress/wp-admin/setup-config.php` (so a
 404) !!

 Why ? My guess is in the `index.php` file:
 {{{#!php
 <?php
 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
 }}}
 is returning `/var/www/myblog_all/myblog_wordpress` instead of what I
 expected `/var/www/myblog`. I know this is "correct" for a PHP point of
 view, but I'm sure I'm not the first one playing with symlinks.

 **Is there a way to give to wordpress the vhost settings?**

 Thanks in advance!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46136>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list