![]() |
httpd.conf per domain
if i want to add a line such as "ServerAlias *.example.com" to my httpd.conf, but only to one domain on my server is this possible and where do I create the file?
for example full path to domain public_html is "/usr/home/***username***/domains/***userdomain***.com/public_html" I'm guessing I just create a file named httpd.conf one level up from public_html but it's not working. Thanks for any help on this =) |
It goes in the VirtualHost part for the specific domain in the config file.. Unless of course you've got some weird setup.
|
i'm looking for an option besides editing the MAIN httpd.conf file. i'm sure I had this option on other hosts. just not sure of the file name or location to make appendages.
|
well as long as you have the Correct Syntax then you need to add a line in your main httpd.conf that shows it where to look for the virtualhost configs Again In the correct Syntax ... or stuff will break
|
There is only one httpd.conf on the server. You need root access to edit it. In the httpd.cond find the virtualhost entry for that domain and add the line inside the virtualhost part for that domain.
|
Quote:
|
Quote:
Many control panels, such as CPanel and Directadmin, will by default include certain files if they exist. If you're using a control panel, post which one or email us for help. However, this very much reminds me of the "how to start the car" instructions I once saw on the back of a visor. If you don't know how to START a car, you shouldn't be driving one. You should get driving lessons or take a taxi. We've seen a lot of "professionals" do a lot of REALLY dumb things with Apache configuration. If you need help with the mechanics of where to put your configuration, you would be wise to have a qualified person review the configuration you plan to use. |
Two options:
1.) Look into and teach yourself mod_rewrite. You can have requests routed based on server name. 2.) Add one line to your httpd.conf file, such as "Include /path/to/my/httpd_conf/*". Then all files within that directory will be automatically included when Apache restarts, allowing you to create one httpd.conf per-domain, or whatever you wanted. |
Quote:
|
Christ,
I hope all of you are making a ton of money. Thank god I decided to take the easy route into being a webmaster. Site concepts - pitch point - landing page - traffic buys - pay day. Whew. |
Quote:
something like this Code:
<VirtualHost *:80> this will create them on the fly. |
You normaly would do the in the vhost part of the main file. But to avoid that you might be able to add something to the .htaccess I would go from there.
|
*example.com is a wildcard DNS record. |
All times are GMT -7. The time now is 09:26 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123