Skip to content

Instantly share code, notes, and snippets.

@harasou
Last active February 14, 2018 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harasou/07c77485abc3743f50981f91b7d7248b to your computer and use it in GitHub Desktop.
Save harasou/07c77485abc3743f50981f91b7d7248b to your computer and use it in GitHub Desktop.
[root@localhost vagrant]# ll /etc/httpd/conf.d/
total 20
-rw-r--r--. 1 root root 366 10月 19 20:39 README
-rw-r--r--. 1 root root 2926 10月 19 20:39 autoindex.conf
-rw-r--r--. 1 root root 1252 10月 19 16:44 userdir.conf
-rwxr-xr-x. 1 root root 210 2月 10 22:00 vhost.conf
-rw-r--r--. 1 root root 824 10月 19 16:44 welcome.conf
[root@localhost vagrant]#
[root@localhost vagrant]# ll /etc/httpd/conf.exbind/
total 0
[root@localhost vagrant]#
[root@localhost vagrant]# exbind /etc/httpd/conf.d/ /etc/httpd/conf.exbind/
[root@localhost vagrant]#
[root@localhost vagrant]# ps u -C exbind
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 27621 0.0 0.0 93032 484 ? Ssl 05:17 0:00 exbind /etc/httpd/conf.d/ /etc/httpd/conf.exbind/
[root@localhost vagrant]#
[root@localhost vagrant]# mount -t fuse.exbind
exbind on /etc/httpd/conf.exbind type fuse.exbind (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
[root@localhost vagrant]#
[root@localhost vagrant]# ll /etc/httpd/conf.d/
total 20
-rw-r--r--. 1 root root 366 10月 19 20:39 README
-rw-r--r--. 1 root root 2926 10月 19 20:39 autoindex.conf
-rw-r--r--. 1 root root 1252 10月 19 16:44 userdir.conf
-rwxr-xr-x. 1 root root 210 2月 10 22:00 vhost.conf
-rw-r--r--. 1 root root 824 10月 19 16:44 welcome.conf
[root@localhost vagrant]#
[root@localhost vagrant]# ll /etc/httpd/conf.exbind/
total 20
-rw-r--r--. 1 root root 366 10月 19 20:39 README
-rw-r--r--. 1 root root 2926 10月 19 20:39 autoindex.conf
-rw-r--r--. 1 root root 1252 10月 19 16:44 userdir.conf
-rwxr-xr-x. 1 root root 210 2月 10 22:00 vhost.conf
-rw-r--r--. 1 root root 824 10月 19 16:44 welcome.conf
[root@localhost vagrant]#
[root@localhost vagrant]# cat /etc/httpd/conf.d/README
This directory holds configuration files for the Apache HTTP Server;
any files in this directory which have the ".conf" extension will be
processed as httpd configuration files. The directory is used in
addition to the directory /etc/httpd/conf.modules.d/, which contains
configuration files necessary to load modules.
Files are processed in alphabetical order.
[root@localhost vagrant]#
[root@localhost vagrant]# cat /etc/httpd/conf.exbind/README
This directory holds configuration files for the Apache HTTP Server;
any files in this directory which have the ".conf" extension will be
processed as httpd configuration files. The directory is used in
addition to the directory /etc/httpd/conf.modules.d/, which contains
configuration files necessary to load modules.
Files are processed in alphabetical order.
[root@localhost vagrant]#
[root@localhost vagrant]# cat /etc/httpd/conf.d/vhost.conf
#!/bin/bash
cat<<'EOD'
<VirtualHost *:80>
ServerName www.hoge.com
DocumentRoot /var/www/html/
</VirtualHost>
<VirtualHost *:80>
ServerName test.hoge.com
DocumentRoot /var/www/test/
</VirtualHost>
EOD
[root@localhost vagrant]#
[root@localhost vagrant]# cat /etc/httpd/conf.exbind/vhost.conf
<VirtualHost *:80>
ServerName www.hoge.com
DocumentRoot /var/www/html/
</VirtualHost>
<VirtualHost *:80>
ServerName test.hoge.com
DocumentRoot /var/www/test/
</VirtualHost>
[root@localhost vagrant]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment