Mod_rewrite not working on ISPConfig 3 Server
ISPConfig 3 Manual says:
Fast-CGI:
Advantages:
- Scripts will be executed with user privileges of the web site;
- More than one PHP version can be run as FastCGI;
- Might be better in speed compared to CGI and suPHP.
Disadvantages:
- php.ini values cannot be changed via PHP scripts, vhost files, .htaccess files. But it is possible to use the Custom php.ini settings field on the Options tab of a web site in ISPConfig to specify custom php.ini settings (see chapter 4.6.1.1).
Instead .htaccess file use ISPConfig's Apache Directives:
Site -> Website -> Web Domain -> Options tab
Apache Directives:
DirectoryIndex index.php RewriteEngine on RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
Drupal 6 INSTALL.txt says:
If the default Drupal theme is not displaying properly and links on the page result in "Page Not Found" errors, try manually setting the $base_url variable in the settings.php file if not already set. It's currently known that servers running FastCGI can run into problems if the $base_url variable is left commented out (see http://bugs.php.net/bug.php?id=19656).
Related videos on Youtube
Akahadaka
Updated on September 18, 2022Comments
-
Akahadaka over 1 year
Problem
I recently migrated a Drupal site from a shared hosting server to my own VM. Everything appears to work correctly, except clean urls.
My VM Setup
- Ubuntu 10.04
- LAMP
- ISPConfig 3
What I've tried
From reading up on a number of drupal forums I've tried the following in this order
- Check that mod_rewrite is installed and enabled
- Changed PHP from FastCGI to Mod_PHP (prefer to use FastCGI or suPHP though to avoid having tmp/files folders with 777 permissions)
- Changed the Redirect type to L in ISPConfig Sites->domain.com->Redirect
Changed /etc/apache2/sites-enabled/000-default
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All ... </Directory>
Not sure about points 3 and 4, I do want all domains to be able to use mod_rewrite out of the box.
Question
Have I done something wrong or am I missing a step? Ultimately I would like to use FastCGI and clean urls working on all ISPConfig 3 domains without having to make any changes to individual domain settings.
Any ideas appreciated, I'll try them all.
-
Jenny D almost 12 yearsHow is it not working? What are you expecting to happen, what happens instead, and what do the logs say?
-
HopelessN00b about 9 yearsAdministration panels are off topic. Even the presence of an administration panel on a system, because they take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally, and tend to indicate low-quality questions from users with insufficient knowledge for this site.