PDA

View Full Version : Mandriva 2009.0 Wordpress permalink problem


greenovni
5th August 2009, 20:10
Hello Falko & Till

I just finished installing ispconfig 2 on Mandriva 2009.0 following the perfect set up located here:

http://www.howtoforge.com/perfect-server-mandriva-2009.0-i386

Then I installed ISPConfig Version: 2.2.32 following the installation instructions

It seems like everything is working so far (haven't tested emails yet)

I made a web within ispconfig as usual, uploaded and installed wordpress 2.7.1 like I had in my previous install of ispconfig (centos 5.3)

After installation everything is ok and I can log into wordpress and see the front page @ my domain.

I needed to set up the permalinks to the post name so I went into my WP admin panel and changed the permalinks to:

/%postname%/

As soon as I did that, I visited my TLD and was greeted by a 403 / forbidden error that says

"You do not have permission to access / on this server"

I figured that I would need to update my apache directives within IPSConfig and proceeded to do so like so:

<IfModule mod_rewrite.c>
<Directory /var/www/web1/web/>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</Directory>
</IfModule>

(Web1 being where I have my new installation of WP)

Still received the 403 forbidden error on both my TLD and wp-admin

Deleted the apache directives and same error - no access to WP

Then I thought that since the new update of ISPConfig that maybe we could just upload an .htaccess file via FTP which I did to receive an

internal server error / 500.

Am I missing a step to get the permalinks working or do I need CHMOD some folder / files?

Any help would be greatly appreciated.

greenovni
6th August 2009, 00:02
I noticed that global mod rewrite has been disabled in ISPConfig 3 for security reasons.

http://www.howtoforge.com/forums/archive/index.php/t-33805.html

Is it the same case in ISP config 2?

I built a personal server, how do I globally enable mod rewrite in ISPConfig 2?

falko
6th August 2009, 15:50
Is it the same case in ISP config 2?

No.

You can try this in the Apache Directives field of that web site in ISPConfig:
<Directory /var/www/web1/web/>
AllowOverride all
</Directory>

greenovni
7th August 2009, 23:26
Hello Falko

No luck getting mod rewrite going

NEW apache directive

<IfModule mod_rewrite.c>
<Directory /var/www/web1/web/>
AllowOverride all
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</Directory>
</IfModule>

OLD Directive

<IfModule mod_rewrite.c>
<Directory /var/www/web1/web/>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</Directory>
</IfModule>

Using any of these 2 directives result in a 403 Forbidden error & that includes the index.php file (home page)

If I take the apache directive out out, website operation is back to normal but no mod rewrite allowed in any of my scripts including word press.

I see that Till wrote about this last month.

You can enable this in your vhost template if you want. So this is not a missing feature nor feature thing at all. To enable rewrites, you will have to allow overriding of file info which on the other hand enables your customers to widen their access restrictions on the server. As a software provider we will have to release a safe system as everyone will complian otherwise. If you dont need a secure system or it does not matter for you if users are able to get additional features without being activated in the site settings by putting them in a .htaccess file, feel free to give your users thiese permissions. Thats why ispconfig uses templates for config files, so everyone can customize the safe default settiongs to its needs.

and this

So, here the way to change the defaults, its really easy and I had posted this last week already but here for refernce again the step:

Edit the file:

/usr/local/ispconfig/server/conf/vhost.conf.master

and replace all lines (the lin exists 4 times in the file):

AllowOverride Indexes AuthConfig Limit

with:

AllowOverride Indexes AuthConfig Limit FileInfo

---
Update:fixed typo in path.

Can the same fix be used for ispconfig 2 on a Mandriva 2009.0 server and if so, where is the file that needs editing as I cannot find it anywhere.

All your help is truly appreciated

madmucho
8th August 2009, 00:34
Ispconfig2 have template file in this location
/root/ispconfig/isp/conf/
your edited templates is good put into
/root/ispconfig/isp/conf/customized_templates
there will be preserver if any ispconfig 2 update comes.

So as i thing you need only allow this customer .htaccess file using apache directive, maibe something like this
<Directory /var/www/web1/web/>
Options +Includes +FollowSymlinks -Indexes
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

If you have problem with internal server 500 or 403 check your apache log..
is good to check your apache config file if there isnt configuration error, like whitespaces or similar, that sometimes happen vhen you using custom apache directives.

I always check this directory if there isnt config files with date sufix, which is conf backup because bad config typo......
/etc/httpd/conf/vhosts/

Maibe this will help you.

greenovni
8th August 2009, 02:34
You are the man!

This is how I have the apache directive now

<Directory /var/www/web2/web/>
Options +Includes +FollowSymlinks -Indexes
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

and it works!

I had manually changed a bunch of AllowOverride Nones to All in a few files and now am changing them back to their original state and see if anything changes.

Once again, thanks!