Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    151
    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:
    166
    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:
    151
    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:
    166
    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:
    151
    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,664
    Likes Received:
    69
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    crontab -e
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice