Benefits of ServerAdmin Directive in Apache2

15,171

Apparently that functionality of Apache has been deprecated. I used to see a message in the event of an error to contact the server administrator, but now can't get it to happen on the current versions.

As an answer to your question "how can it be useful"; you can get the value with PHP at least $_SERVER['SERVER_ADMIN'] and return that from your code in the event of an error.

Share:
15,171

Related videos on Youtube

Enrique Moreno Tent
Author by

Enrique Moreno Tent

I am a full-stack web developer. Born in Spain, living in Germany currently. Always interested in learning more and improving the quality of my work. Also, very glad to be a part of this community where we all help each other. Let's break some eggs!

Updated on June 04, 2022

Comments

  • Enrique Moreno Tent
    Enrique Moreno Tent almost 2 years

    How exactly can the ServerAdmin directive in Apache2 be useful?

    The Apache2 documentation reads:

    The ServerAdmin sets the contact address that the server includes in any error messages it returns to the client.

    But whenever I get a 404 Error back, the email address set in my vhost is nowhere to be seen. Do I need some extra Directive to make it work?

    vhost:

    <VirtualHost *:8080>
        ServerAdmin [email protected]
        ServerName testsite.example.com
        DocumentRoot /var/www/example.com/www
    </VirtualHost>