PDA

View Full Version : How to add an alias in httpd.conf



fmortara
11-18-2009, 02:55 PM
Hi,
I want to add an alias link in httpd configuration for every user for redirect /webmail/ link to "/var/www/html/roundcube/".

Like as:
Alias /webmail "/var/www/html/webmail/"

I find the httpd-alias.con in extra dir, but if I modify this file, on update DA overwrite it?

Thanks in advance.
Francesco

scsi
11-19-2009, 10:52 AM
Only when apache updates.

You can always run the command:



chattr +i /etc/httpd/conf/extra/httpd-alias.conf


to prevent it from being touched.

Only downfall is if there is a new alias you want to add you will have to remove the chattr settings before being able to edit the file.

nobaloney
11-20-2009, 09:49 AM
In my epxerience the files in the extra directory are left alone, even when using custombuild to update Apache.

@fmortara, please don't double post.

Jeff

scsi
11-20-2009, 11:56 AM
I dunno I seen mine overwritten before. Not sure exactly when. Maybe it was an older release of custombuild or something.

nobaloney
11-24-2009, 02:48 PM
I checked one of my servers before I posted that they weren't ovewritten. The definitive reply would have to come from user smtalk (Martynas); as I believe he wrote the custombuild code.

Jeff