eZ Community » Forums » Install & configuration » VirtualHost Config
expandshrink

VirtualHost Config

VirtualHost Config

Friday 24 October 2003 2:39:37 pm - 6 replies

Hi

I am trying to get rid of the index.php part of the URLs on my website (ie I would like the urls to look like http://www.mysite.com/content/view/full/2 instead of http://www.mysite.com/index.php/content/view/full/2). AFAIK, all I need to do is ensure that the virtualhosting stuff on apache is configured correctly.

It looks fine to me, but this part still isn't working. I am hoping that someone on this forum can direct me to the source of my problem.

The relevant parts of my httpd.conf look like:

NameVirtualHost 192.168.0.1
<VirtualHost 192.168.0.1>
ServerAlias www.mysite.com
<!-- Other config directives -->
</VirtualHost>

I have another virtualhost directive for the admin site.

My site.ini.append.php looks like:
[SiteAccessSettings]
MatchOrder=host
HostMatchType=map
HostMatchMapItems[]=mysite.com;rcc
HostMatchMapItems[]=www.mysite.com;rcc
HostMatchMapItems[]=admin.mysite.com;admin

If anyone can give me some pointers here, I would really appreciate it.

Thanks

Friday 24 October 2003 2:49:37 pm

Hi,

In httpd.conf, try to set
DirectoryIndex index.php

Remeber to restart apache.

See if that works.

-Ole

Modified on Friday 24 October 2003 2:50:43 pm by Ole Morten Halvorsen

Friday 24 October 2003 2:58:45 pm

This might be of interest to you, a sample of my own http.conf. It's a slightly modified version of what you've got in yours that lets you have multiple virtual hosts on the same server - handy if you want to use phpmyadmin and ezpublish together, for example:

#-----------------------------------------------------------------
NameVirtualHost *:80

# View your site locally by entering localhost into the location
# bar of your browser
<Virtualhost *:80>
<Directory /var/www/html/ezpublish-my-sites/>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /index.php

ServerAdmin root@localhost
DocumentRoot /var/www/html/ezpublish-my-sites/
ServerName localhost
</Virtualhost>

# View phpmyadmin locally by entering phpmyadmin into
# the location bar of your browser
<Virtualhost *:80>
<Directory /var/www/html/phpMyAdmin-2.5.4/>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /index.php

ServerAdmin root@localhost
DocumentRoot /var/www/html/phpMyAdmin-2.5.4/
ServerName phpmyadmin
</Virtualhost>

# View your site from the web by entering it's internet url
# into the location bar of your browser
<Virtualhost *:80>
<Directory /var/www/html/ezpublish-my-sites/>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /index.php

ServerAdmin root@localhost
DocumentRoot /var/www/html/ezpublish-my-sites/
ServerName www.myezpublish.no-ip.com
</Virtualhost>
#-----------------------------------------------------------------

You probably need to change your match order to uri instead of host, or put "uri, " before host. Either that or I've read your question wrong and have just wasted both of our time blunk.gif Emoticon

~James~

Modified on Friday 24 October 2003 3:05:16 pm by James Packham

Friday 24 October 2003 4:18:10 pm

Thanks for the replies.

Ole: I have DirectoryIndex index.php together with a few other directives (rewrite rules, etc) in my .htaccess file. Should this make a difference.

James: What you have there is very similar to what I have except that I have to specify an IP address (the same box is used for hosting multiple sites) and that some of my directives are located in my .htaccess file for the site.

Regards,

Tristan

Friday 24 October 2003 4:33:36 pm

Hi,

I have a small prob with vhosts also...
I need to get one folder inside eZ's folder to act as its own url...
Example:
My ez is running in url: www.mysite.com (www.mysite.com/page1 etc.)
So everything after .com/ goes through index.php.
And I need one folder to go like www.mysite.com/folder
It cannot do it now, 'cause it goes through index.php.

How can I make an overwrite to htacces or httpd.conf so this specific folder wouldn't go through index.php and would act normally?

Regards,
Jerry

Friday 24 October 2003 6:26:54 pm

Jerry,

Try this http://ez.no/developer/ez_publish...ips_tricks/exclude_uris_from_rewrite

Friday 24 October 2003 7:03:46 pm

Hi Tony,

Thanks for the link, but my eZ is still giving me "module not found error". sad.gif Emoticon

I have restarted apache many times already...

Hope there's still some solution.

Regards,
Jerry

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from