I am trying to have a multi-site installation with clean urls and have a few problems (it's taken me a while to get this far). I cannot find anything about this in the forums.
My setup is of the form:
mysite/
mysite/site2
My Apache DocumentRoot is set to /var/www/localhost/htdocs and there is an alias to the second site:
Alias /test "/var/www/localhost/htdocs"
My sites dir is set up with default and test subdirs. Multi-site works, and clean_urls work on the base site.
All seems fine until I try to set up clean_urls on the second site (mysite/site2) -- the drupal admin/settings test fails. How can I fix or debug this? Where are the rewrite rules stored for the second site? (I'm assuming that they are in the same .htaccess file -- perhaps even just the same rules). I tried to turn on the urls (and url_test) in MySQL but it still didn't work.
Something is happening with ModRewrite during the test as the rewrite.log that I've set up includes this:
127.0.0.1 - - [15/Sep/2005:18:22:50 --0400] [mysite/sid#80a2bd8][rid#820f150/initial/redir#1] (3) [per-dir /var/www/localhost/htdocs/] strip per-dir prefix: /var/www/localhost/htdocs/index.php -> index.php
127.0.0.1 - - [15/Sep/2005:18:22:50 --0400] [mysite/sid#80a2bd8][rid#820f150/initial/redir#1] (3) [per-dir /var/www/localhost/htdocs/] applying pattern '^(.*)$' to uri 'index.php'
Thanks
Comments
When you say the
"admin/settings test fails", what exactly do you mean?
What happens when you try to navigate to other nodes on your site? Can you navigate to other nodes on your site?
Some additional details could be heplful in sorting this out.
Cheers,
bonobo
-------
http://www.funnymonkey.com
Tools for Teachers
-------
http://www.funnymonkey.com
When I try to enable
When I try to enable clean_urls on the secondary site (mysite/site2) I get the following error in mysite/site2?q=admin/settings:
When I do the same thing on the main site (mysite/) I do not get an error and clean_urls are used throughout that site without any problem.
There was an error in my first posting. The http.conf line should have read:
Without clean_urls on the secondary site, it still works fine. I can still see all the content with the correct theme etc. I just can't enable clean_urls. If I type in a clean_url equivalent for the secondary site eg
http://mysite/site2/admin/settings it takes me to the main site http://mysite/admin/settings (although the url stays at http://mysite/site2/admin/settings) so it seems to be redirecting everything back to the main site.
Thanks.
When you don't
have clean url's enabled on your second site (mysite/site2) can you navigate cleanly throughout your site?
I would try commenting out the alias in your httpd.conf file -- while you need a symbolic link in the root directory of your drupal install for site2 (see this post), I don't think you need the alias in .htaccess.
I hope this helps.
Cheers,
bonobo
-------
http://www.funnymonkey.com
Tools for Teachers
-------
http://www.funnymonkey.com
Thank you very much.
Thank you very much. Removing the alias from http.conf and adding the symbolic link as you suggested seems to have worked. Drupal will now allow me to use clean_urls on the second site and they all work well.
Get similar under Mac OS X
Webel
Webel IT Australia, "Elements of the Web", Scientific IT Consultancy,
For PHP-driven Drupal CMS web sites, Enterprise Java, graphical UML, UML Parsing Analysis, SysML, XML.
Alias approach fails under Mac OS X 10.5.6 need httpd.conf alias
And need clean URLs for Ubercart.
Webel IT Australia, "Elements of the Web", Scientific IT Consultancy,
For PHP-driven Drupal CMS web sites, Enterprise Java, graphical UML, UML Parsing Analysis, SysML, XML.
solution with alias?
sorry to bump a three years old comment, but this is the closest to my problem i could find.
in fact, i ran into the exact same thing as kiz_0987, but setting the symlink is not an option for me. (my subsite is actually www.example.com/~user and the implicit alias redirect comes from apache's userdir directive.)
any help appreciated!
cheers,
nico
Am in same situation
@nicomat, what OS ?
Webel IT Australia, "Elements of the Web", Scientific IT Consultancy,
For PHP-driven Drupal CMS web sites, Enterprise Java, graphical UML, UML Parsing Analysis, SysML, XML.