Apache always down !

Discussion in 'Server Operation' started by Typhon, Mar 29, 2012.

  1. Typhon

    Typhon New Member

    Hello,
    I have a problem with Apache, i don't know why but evry day he'll be down...
    When i try to access to my website i have an error such :
    400 acces denied
    You haven't the permission to access /
    Thank you for helping me =D
    I'm ready to give you more informations, you have to tell me what for information ;-)
     
  2. sjau

    sjau Local Meanie Moderator

    what do apache logs say?
     
  3. Ovidiu

    Ovidiu Active Member

    obviously apache is not down if you are getting the 400 error message so what is in your apache logs?
     
  4. Typhon

    Typhon New Member

    I have this error today to :
    How can i see the log ?
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Apache logs are usually in /var/log/apache2 or /var/log/httpd. There might also be a log directory above your website's document root.
     
  6. Typhon

    Typhon New Member

    Hi !
    I can't connect to SSH (an other problem, i just need to change my IP)
    So, i think that i found the problem : My friend.
    He said to me that he use my server to spam. so he certainly sent a lot of mails (5 000) per hour every day (i don't know if more or less)
    Now, i need how to limit the number of mail sent every secondes or minutes or hours, I use LAMP and Postfix and Davecot. (i suppose that he has use PHP mail)
    Thank ;-)
    EDIT : I disabled mail server momently
     
    Last edited: Apr 5, 2012
  7. falko

    falko Super Moderator ISPConfig Developer

    Are you serious? If I were you, I'd ban the friend from the server.
     
  8. Typhon

    Typhon New Member

    OMG logs are empty Oo"
     
  9. Typhon

    Typhon New Member

    Now, i need how to limit the number of mail sent every secondes or minutes or hours, I use LAMP and Postfix and Davecot. (i suppose that he has use PHP mail)
     
  10. ehansen

    ehansen New Member

    Probably your best bet to limit the amount mail per timeframe is a firewall/iptables rule:

    Code:
    iptables -I INPUT -p tcp --dport <mail port #> -d <ip address to limit> -m limit --limit 2/min --burst 3 -j ACCEPT
    iptables -I OUTPUT -p tcp --sport <mail port #> -s <ip address to limit> -m limit --limit 2/min --burst 3 -j ACCEPT
    This allows 2 connections a minute on the mail port specified (maximum/burst of 3 connections a minute) coming from (INPUT) or going to (OUTPUT) the IP address. As far as I know there is no settings in Postfix or Courier for this.
     
  11. Typhon

    Typhon New Member

    Hi all !
    Hum after all i have always the same problem
    I flowed this tuto : howtoforge.com/perfect-server-debian-squeeze-with-bind-and-courier-ispconfig-3
    I am really starting to demotivate and demoralize me :(
     

Share This Page