Reply
I have a problem with httpd.conf of Apache and need to change it with PHP
Old 03-17-2006, 12:21 PM I have a problem with httpd.conf of Apache and need to change it with PHP
Novice Talker

Posts: 7
I need to change my httpd.conf from apache hosted in a shared server. I
need it to be a virtual server, and for that I need to add the
following lines:

PHP Code:
 <VirtualHost *> 
 
DocumentRoot /home/totally/public_html 
 ServerAdmin webmas
...@mydomain.com 
 ServerName mydomain
.com 
 ServerAlias 
*.mydomain.com 
 User username 
 Group username 
 RedirectMatch 301 
(.*) http://mydomain.com$1 
 
</VirtualHost

My host doesn't want to change the file, so, I wolud really appreciate
if someone could help me to change it from php

Thanks
jhonsmith.co is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 03-17-2006, 12:51 PM Re: I have a problem with httpd.conf of Apache and need to change it with PHP
chrishirst's Avatar
Super Moderator

Posts: 13,584
Location: Blackpool. UK
don't believe you can with PHP (never tried it though)

But even if you could edit it, have you the access to to restart the Apache server ? because httpd.conf is only read and implemented on server startup.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-17-2006, 01:08 PM Re: I have a problem with httpd.conf of Apache and need to change it with PHP
Novice Talker

Posts: 7
Thanks for the help, and no I don't have access to the apache server
jhonsmith.co is offline
Reply With Quote
View Public Profile
 
Old 03-17-2006, 01:38 PM Re: I have a problem with httpd.conf of Apache and need to change it with PHP
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
What exactly are you trying to do? You already have an entry like that for your site in the httpd.conf file, that is how your site is able to be displayed when somebody types your domain.

You can modify or change certain peices of the virtual host entry using a .htaccess file in the root of your website. Let us know exactly what you want to acheive and we'll tell what to put in the file. Judging by your post, it looks like you want to setup a RedirectMatch, is this correct?
Anacrusis is offline
Reply With Quote
View Public Profile Visit Anacrusis's homepage!
 
Old 03-17-2006, 02:22 PM Re: I have a problem with httpd.conf of Apache and need to change it with PHP
Novice Talker

Posts: 7
I'm trying to set up a wildcard for the domain, It's like catch-all email, but with the domains. and I don't have access the httpd.conf file directly

I looked at Apache::httpd_conf, but I've never used Perl, And i haven't found any function in PHP so far to do this

Last edited by jhonsmith.co : 03-17-2006 at 04:18 PM.
jhonsmith.co is offline
Reply With Quote
View Public Profile
 
Old 03-17-2006, 03:34 PM Re: I have a problem with httpd.conf of Apache and need to change it with PHP
Average Talker

Posts: 17
Name: Jamie Carruthers
Location: Dumfriesshire
If it's just a catch all you should be able to do this from your control panel, not httpd.conf.
__________________
Jamie Carruthers

Last edited by Superb : 03-17-2006 at 03:39 PM.
Superb is offline
Reply With Quote
View Public Profile Visit Superb's homepage!
 
Old 03-17-2006, 04:15 PM Re: I have a problem with httpd.conf of Apache and need to change it with PHP
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Your host is the only one who can set this up for you. If they are unwilling then there really is nothing you can do. It's not just the apache conf file that needs to be modified, your DNS zone file needs to be changed as well.
Anacrusis is offline
Reply With Quote
View Public Profile Visit Anacrusis's homepage!
 
Reply     « Reply to I have a problem with httpd.conf of Apache and need to change it with PHP
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13241 seconds with 12 queries