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>
The Apache2 documentation reads: The ServerAdmin sets the contact address that the server includes in any error messages it returns to the client.
Apache directives are a set of rules which define how your server should run, the number of clients that can access your server, etc. you can configure them by using the apache2. conf or httpd. conf files.
Apache is configured by placing configuration directives, such as Listen and ServerName , into a configuration file, which will be read by the Apache executable during the startup. The default configuration file is called " httpd. conf " (or " apache2. conf ") in the directory " <APACHE_HOME>\conf ".
Listen. The Listen command identifies the ports on which the Web server accepts incoming requests. By default, the Apache HTTP Server is set to listen to port 80 for non-secure Web communications and (in the /etc/httpd/conf.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With