![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: May 2002
Posts: 8,098
|
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 =) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
It goes in the VirtualHost part for the specific domain in the config file.. Unless of course you've got some weird setup.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: May 2002
Posts: 8,098
|
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jan 2001
Location: Baltimore
Posts: 2,834
|
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
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
...
Industry Role:
Join Date: Apr 2003
Posts: 2,280
|
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
The option for doing it somewhere else only exits if the main http file includes separate virtual host file(s)...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Oct 2002
Posts: 3,745
|
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.
__________________
For historical display only. This information is not current: support@bettercgi.com ICQ 7208627 Strongbox - The next generation in site security Throttlebox - The next generation in bandwidth control Clonebox - Backup and disaster recovery on steroids |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Oct 2007
Posts: 1,448
|
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.
__________________
xMarkPro -- Ultimate Blog Network Management Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: May 2002
Posts: 8,098
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Converting like it's 1999
Industry Role:
Join Date: Jan 2009
Location: The South
Posts: 6,164
|
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.
__________________
10 years of experience in: CHAT SALES - PAID TRAFFIC - CONVERSION - CREATIVES - CONSULTATION |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
Quote:
something like this Code:
<VirtualHost *:80> ServerName example.com DocumentRoot /home/user/domains VirtualDocumentRoot /home/user/domains/%0/public_html </VirtualHost> <VirtualHost *:80> ServerName www ServerAlias www.* DocumentRoot /home/user/domains VirtualDocumentRoot /home/user/domains/%2+/public_html </VirtualHost> this will create them on the fly.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Industry Role:
Join Date: Aug 2002
Posts: 9,752
|
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
It's 42
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
|
*example.com is a wildcard DNS record. |
![]() |
![]() ![]() ![]() ![]() ![]() |