Forum Topic: Setting SERVER_ADMIN

Forum: .htaccess Forum : Basics • Posted by A B • Updated:

I am not able to change my SERVER_ADMIN variable from the default postmaster@localhost. I’m using XAMPP 5.6.3.

Here is my .htaccess content:

SetEnv SERVER_ADMIN me@anthonybartoli.com

I have verified in httpd.conf that the mod_env module is being loaded:

LoadModule env_module modules/mod_env.so

And mod_env.so is in fact in xampp\apache\modules

And AllowOverride is set to All for the document root:

<Directory "C:/xampp/htdocs">
	Options Indexes FollowSymLinks Includes ExecCGI
	AllowOverride All
	Require all granted
</Directory>

Directory set up:

C:\xampp\htdocs\projects\htaccess\
.htaccess
phpinfo.php

phpinfo.php:

<?php echo $_SERVER["SERVER_ADMIN"]; ?>

outputs:

postmaster@localhost

And http://localhost/projects/htaccess/bad_url also lists the default postmaster@localhost as the webmaster address in the 404 page.

Any suggestions on why this is happening?

2 Replies to “Setting SERVER_ADMIN”

Posted by Jeff Starr

Very interesting, but honestly I’m not sure why it wouldn’t work. One idea to is to try the same on a live server somewhere to determine if it may be something _AMP-specific.

Posted by A B •

Thanks Jeff. I just wanted to make sure I wasn’t missing something.