The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A automatic HTTPD.conf editor

Discussion in 'General Discussion' started by Justin22, Oct 28, 2005.

  1. Justin22

    Justin22 Member

    Joined:
    Oct 24, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Well, I few days ago I posted about having a problem with a LAN, and its IP. My problem is still the same, after toying with many different things. Someone told me i need to make a scripts that finds the outside IP, and replaces it with the LAN IP for virtual hosts. Which is entirely correct as i cannot listen to the outside IP from inside the lan.

    So If anyone has any advice or could offer assistance in how i would make a script that finds xxx.xxx.xxx.xxx and replaces it with xxx.xxx.xxx.xxx i would be very happy.

    --
    Justin
     
  2. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    All you need to do is this command: replace "WANIP" "LANIP" -- /usr/local/apache/conf/httpd.conf
     
  3. Justin22

    Justin22 Member

    Joined:
    Oct 24, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Sweet, so run that as a cron?
     
  4. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    If that's what you need, then yes.
     
  5. Justin22

    Justin22 Member

    Joined:
    Oct 24, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Interesting...

    Well I attempted that yesterday to find out apache needs to be restarted every time it edits it. Well, thats not the problem at the moment. The problem Is that I cant run it as a cron job, im using a user with "root" access, as the root user cant acccess cpanel, and me being the linux n00b that I am, I have no idea how to set them in SSH/Terminal. So can anyone help me here?
     
  6. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    crontab -e
     
Loading...

Share This Page