I've messed up my Apache2 httpd.conf :(

Discussion in 'Apache' started by J7mbo, Nov 14, 2012.

  1. #1
    Hi guys, I really would appreciate some help from the experts here. I've completely messed up my httpd.conf and other settings on my VPS and the worst thing is - I can't find out what I've done wrong! Please help, I've had a few hack attempts using my Apache recently, so I want to get this up as soon as poss!

    Currently getting FORBIDDEN when I try and access IP/downloads/<username> and login correctly using a username in mysql table (so this isn't this issue).


    My aim:


    /var/www/downloads/<username-sub-dir> all username sub dir's require a username / password (from mod_auth_mysql) to view the file listing, OR to have a cookie available.


    I have conflicts clearly between httpd.conf and /sitest-enabled/000-default. I'm not experienced with most of the stuff here, so any help would be massively appreciated!


    Setup


    sites-enabled/000-default: http://jsfiddle.net/Xcece/
    httpd.conf here: http://jsfiddle.net/CFRSu/


    I'm not using .htaccess files. This all seemed to work a few days ago, now it's not :(


    Any help would be amazing right now after the previous hack attempt that grabbed all my code :eek:
     
    J7mbo, Nov 14, 2012 IP
  2. juerald

    juerald Active Member

    Messages:
    352
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    65
    #2
    Why you did not back up it before? Can you try to reinstall the apache
     
    juerald, Nov 14, 2012 IP
  3. J7mbo

    J7mbo Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'll definitely be doing backups after this haha. I can, but there's a lot of other settings on there. It still serves webpages - the problem is with the directory listings. Really I was hoping someone who know about httpd.conf would be able to point out what is probably an obvious mistake :)
     
    J7mbo, Nov 14, 2012 IP
  4. juerald

    juerald Active Member

    Messages:
    352
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    65
    #4
    Can you change the httpd.conf to default? if yes?

    http://livenudefrogs.com/~anubis/apache/httpd-conf.shtml
     
    juerald, Nov 14, 2012 IP
  5. J7mbo

    J7mbo Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I can.. My current httpd.conf is here: http://jsfiddle.net/CFRSu/
    Your site doesn't load anything
     
    J7mbo, Nov 14, 2012 IP
  6. juerald

    juerald Active Member

    Messages:
    352
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    65
    #6
    If the current its not right change it to default?
     
    juerald, Nov 14, 2012 IP
  7. J7mbo

    J7mbo Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Because I want it to allow access to directory listings if one of the two occurs:
    1) They login correctly via mysql_auth that pops up when they try to access /downloads/<username>
    OR
    2) A cookie exists called "cookie"

    This is the part that's not working properly, but it used to be.. :(
     
    J7mbo, Nov 14, 2012 IP