Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Dec 09, 2016 6:44 pm


This forum is dedicated to Apache, Nginx, Lighttpd, Squid and other HTTP transport protocol related software

Author Message
LaR3
  Post  Post subject: Apache: how to list virtual hosts that are currently configured on my Apache server ?  |  Posted: Sun Feb 07, 2010 10:04 am

Joined: Mon Aug 03, 2009 4:55 pm
Posts: 19

Offline
 

Apache: how to list virtual hosts that are currently configured on my Apache server ?

How can I see what virtual hosts are currently configured on my Apache server ?

Instead of checking the httpd.conf file or the included alternate files of apache, using the "-S" option.
Code:
# /opt/apache/bin/httpd -h
Usage: /opt/apache/bin/httpd [-D name] [-d directory] [-f file]
                             [-C "directive"] [-c "directive"]
                             [-k start|restart|graceful|graceful-stop|stop]
                             [-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
  -D name            : define a name for use in <IfDefine name> directives
  -d directory       : specify an alternate initial ServerRoot
  -f file            : specify an alternate ServerConfigFile
  -C "directive"     : process directive before reading config files
  -c "directive"     : process directive after reading config files
  -e level           : show startup errors of level (see LogLevel)
  -E file            : log startup errors to file
  -v                 : show version number
  -V                 : show compile settings
  -h                 : list available command line options (this page)
  -l                 : list compiled in modules
  -L                 : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)
  -S                 : a synonym for -t -D DUMP_VHOSTS
  -t -D DUMP_MODULES : show all loaded modules
  -M                 : a synonym for -t -D DUMP_MODULES
  -t                 : run syntax check for config files


List virtual hosts in apache


Code:
# /opt/apache/bin/httpd -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server www.example.com (/opt/apache/conf/vhosts.d/www.example.com.conf:2)
         port 80 namevhost forum.example.com (/opt/apache/conf/vhosts.d/forum.example.com.conf:2)
*:443                  is a NameVirtualHost
         default server https.example.com (/opt/apache/conf/vhosts.d/https.conf:6)
         port 443 namevhost .test.https.example.com (/opt/apache/conf/vhosts.d/https.conf:6)
Syntax OK

_________________
Humble user
http://www.ivorde.ro





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Apache: how to list virtual hosts that are currently configured on my Apache server ?"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Nginx: How to list virtual hosts

mandrei99

0

6746

Mon Feb 23, 2015 5:05 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Apache 2.2 installation of mod_rewrite module without recompiling whole apache

debuser

0

2903

Tue Mar 23, 2010 11:22 am

debuser View the latest post

There are no new unread posts for this topic. Apache to Nginx Server parameters translation with php function

debuser

0

49981

Thu Aug 26, 2010 7:47 am

debuser View the latest post

There are no new unread posts for this topic. How to test deflate/gzip compression on a HTTPS (HTTP over SSL) Apache server

debuser

0

1974

Tue Aug 03, 2010 3:30 am

debuser View the latest post

There are no new unread posts for this topic. Apache - Restricting "Server" information in HTTP response header with ServerTokens

debuser

0

414

Thu Nov 10, 2011 6:39 am

debuser View the latest post

There are no new unread posts for this topic. Attachment(s) Nginx + apache (for PHP) with real IP addresses in logs

designeru

0

570

Tue May 18, 2010 9:49 am

designeru View the latest post

There are no new unread posts for this topic. How can I see what modules are loaded on my custom built Apache binary

LaR3

0

813

Sun Feb 07, 2010 9:54 am

LaR3 View the latest post

There are no new unread posts for this topic. Converting PhpBB-SEO Apache RewriteRule to Nginx rewrite

debuser

0

1649

Tue Feb 23, 2010 5:00 am

debuser View the latest post

There are no new unread posts for this topic. Apache Invalid command 'AuthGroupFile', perhaps misspelled or defined by a module not included

LaR3

0

2344

Mon Sep 21, 2009 6:42 pm

LaR3 View the latest post

There are no new unread posts for this topic. Apache: access to /dir failed, reason: require directives present and no Authoritative handler

LaR3

0

1564

Mon Sep 21, 2009 6:48 pm

LaR3 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO