How can I create a Webmin user who can only configure one Apache virtual server or DNS domain?
In the Webmin Servers module.
Create a new user and give him access to only the Apache Webserver module.
After saving, click on Apache Webserver next to the user’s name in the list of Webmin users and use the form that appears to deny him access to everything except one selected virtual server.
Many other modules can also be configured in a similar way to restrict the access of a user to only certain DNS domains, Unix users or mail aliases.
Hide apache web server version
It is possible to hide apache web server version and other information. This is done for security reasons. It is not a good idea to broadcast the version of the software that you are running on the server. You should have noticed the following details(or something similar) when an error page is displayed.
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6 Server at XXX.com Port 80
Add/Edit the two entries in the apache configuration file(httpd.conf)
ServerSignature Off
ServerTokens Prod
ServerSignature Off : tells apache not to display the server version on error pages, or other pages it generates.
ServerTokens Prod : tells apache to only return Apache in the Server header, returned on every page request.
Restart the webserver.
How to upgrade apache in a directadmin server
For upgrading apache from 1.3.39 to Apache 2.0.63, just login to the server and run following commands/scripts.
#cd /usr/local/directadmin/customapache
#./build update
#./build clean
#./build update_data_ap2
#./build convert
#./build apache_2
#./build php_ap2 n
#./build mod_frontpage_ap2
#./build mod_perl_ap2
Compile Apache
Download from - http://mirrors.homepagle.com/apache/httpd/httpd-2.2.11.tar.gz
Untar the file httpd-2.2.11.tar.gz
cd into httpd*
Type the following to prepare for building.
./configure –prefix=[path] –enable-module=so
make
make install
Check if you have mod_so enabled:
cd to the Apache bin directory
Open httpd.conf and find a line starting with ServerAdmin.
ServerAdmin admin@serverbuddies.com
Find a line starting with ServerName.
ServerName server1.serverbuddies.com:80
Save the file.
cd up a directory (type cd ..)
Start Apache
Apache Error: Unable to open logs
Sometimes apache will fail to start. It will show the following error message in apache error logs:
Unable to open logs
This is because of the low number of file descriptors. Check the current limit of file descriptors in the file /proc/sys/fs/file-max:
$ cat /proc/sys/fs/file-max
1024
If fs.file-max is quite small (several thousands or so), it should be changed to a higher value.
$ echo “65535″ > /proc/sys/fs/file-max
If you want this new value to survive across reboots you can add it to /etc/sysctl.conf.
# Maximum number of open files permited
fs.file-max = 65535
To load new values from the sysctl.conf file:
$ sysctl -p /etc/sysctl.conf
Hint: Add `ulimit -n 65536` command to /etc/rc.d/init.d/httpd or /etc/init.d/httpd and /usr/sbin/apachectl apache startup scripts at the top.