At the moment it is a single run process. The less prompting for users the better and only prompt where it's really needed.
I've got it loading up all the virtualhosts but I got problems when some servers return from the 'httpd -V' command an example list below :
.
.
-D HTTPD_ROOT="/home/httpd"
-D SUEXEC_BIN="/home/httpd/bin/suexec"
-D DEFAULT_PIDLOG="/var/logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types"
-D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"
In httpd.conf file there are some lines which have :
Include conf/othervhosts.conf
Now my script checks SERVER_CONFIG_FILE and HTTPD_ROOT and in the case above. I can't find an easy way to know whats the default path for 'conf/othervhosts.conf'
We know it'll be /etc/httpd/ but programatically we can't assume it.. so i'm stuck on some servers like the above server. Others I've tested worked and an example print_r of my list is as below :
PHP Code:
*snip*[0] is default with no ServerName,etc.
config Object
(
[httpdroot] => /home/httpd
[httpdconf] => /etc/httpd/conf/httpd.conf
[httpdcompiled] => Array
(
[APACHE_MPM_DIR] => server/mpm/prefork
[APR_HAS_SENDFILE] =>
[APR_HAS_MMAP] =>
[APR_HAVE_IPV6 (IPv4-mapped addresses enabled)] =>
[APR_USE_SYSVSEM_SERIALIZE] =>
[APR_USE_PTHREAD_SERIALIZE] =>
[SINGLE_LISTEN_UNSERIALIZED_ACCEPT] =>
[APR_HAS_OTHER_CHILD] =>
[AP_HAVE_RELIABLE_PIPED_LOGS] =>
[HTTPD_ROOT] => /home/httpd
[SUEXEC_BIN] => /home/httpd/bin/suexec
[DEFAULT_PIDLOG] => /var/logs/httpd.pid
[DEFAULT_SCOREBOARD] => logs/apache_runtime_status
[DEFAULT_LOCKFILE] => /var/logs/accept.lock
[DEFAULT_ERRORLOG] => logs/error_log
[AP_TYPES_CONFIG_FILE] => /etc/httpd/conf/mime.types
[SERVER_CONFIG_FILE] => /etc/httpd/conf/httpd.conf
)
[VirtualHosts] => Array
(
[0] => vhost Object
(
[ServerName] =>
[ServerAlias] =>
[ServerAdmin] => webadmin@domain1.com
[DocumentRoot] => /home/httpd/html
[CustomLog] => /var/log/httpd/access.log Combined
[ErrorLog] =>
[AccessLog] =>
[HttpdIncludes] => Array
(
[0] => HostNameLookups double
[1] => RewriteEngine on
[2] => RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
[3] => RewriteRule .* - [F]
)
)
.
.
.
[2] => vhost Object
(
[ServerName] => mail.domain3.com
[ServerAlias] => Array
(
[1] => mail.domain4.com.au
[2] => smtp.domain5.com.au
)
[ServerAdmin] => mailadmin@domain1.com
[DocumentRoot] => /home/httpd/squirrelmail
[CustomLog] => /var/log/httpd/webmail-access.log Combined
[ErrorLog] =>
[AccessLog] =>
[HttpdIncludes] => Array
(
[0] => HostNameLookups double
)
)
.
.
.
[23] => vhost Object
(
[ServerName] => domain6.com
[ServerAlias] => Array
(
[1] => www.domain6.com
)
[ServerAdmin] =>
[DocumentRoot] =>
[CustomLog] =>
[ErrorLog] =>
[AccessLog] =>
[HttpdIncludes] => Array
(
[0] => ProxyRequests off
[1] => ProxyPass / http://web1.domain6.com/
[2] => ProxyPassReverse / http://web1.domain6.com/
)
)
)
)
Recent comments
22 hours 28 min ago
1 day 3 hours ago
1 day 3 hours ago
1 day 4 hours ago
1 day 5 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago