Make WordPress Core

Opened 6 years ago

Last modified 5 years ago

#46136 new defect (bug)

WordPress install impossible when using symlinks in apache vhost

Reported by: bracol's profile bracol Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.0.3
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

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
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!

Change History (1)

#1 @SergeyBiryukov
5 years ago

Hi @bracol, welcome to WordPress Trac! Thanks for the report.

Related: #25797, #35375.

I could not reproduce the issue so far, just wanted to leave a note with related tickets that might be helpful when looking into this further.

Note: See TracTickets for help on using tickets.