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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-22-2011, 06:28 PM   #1
GFED
Confirmed User
 
GFED's Avatar
 
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 =)
GFED is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 06:36 PM   #2
Tempest
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.
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 06:51 PM   #3
GFED
Confirmed User
 
GFED's Avatar
 
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.
GFED is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 06:52 PM   #4
oscer
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
__________________
XR Networks
Dedicated | VPS | Shared Hosting
ICQ 42602565
oscer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 06:53 PM   #5
Konda
...
 
Konda's Avatar
 
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.
Konda is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 07:26 PM   #6
Tempest
Too lazy to set a custom title
 
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
Quote:
Originally Posted by GFED View Post
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.
The option for doing it somewhere else only exits if the main http file includes separate virtual host file(s)...
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 11:19 PM   #7
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by Tempest View Post
The option for doing it somewhere else only exits if the main http file includes separate virtual host file(s)...

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
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-22-2011, 11:24 PM   #8
Kiopa_Matt
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!
Kiopa_Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2011, 01:28 AM   #9
GFED
Confirmed User
 
GFED's Avatar
 
Industry Role:
Join Date: May 2002
Posts: 8,098
Quote:
Originally Posted by Tempest View Post
The option for doing it somewhere else only exits if the main http file includes separate virtual host file(s)...
got it, thanks!
GFED is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-23-2011, 01:50 AM   #10
Diomed
Converting like it's 1999
 
Diomed's Avatar
 
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
Diomed is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-27-2011, 10:57 PM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by GFED View Post
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 =)
maybe try mod_vhost_alias

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>
example /home/user/domains/gfy.com/public_html will work by creating a gfy.com/ dir with a subdir of public_html

this will create them on the fly.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2011, 01:11 AM   #12
chaze
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.
chaze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2011, 07:31 AM   #13
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
*example.com is a wildcard DNS record.

a.example.com, b.example.com, c.example.com, d.example.com, etc ... will all resolve to example.com with the same content if that is what you want to accomplish.

http://en.wikipedia.org/wiki/Wildcard_DNS_record
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.