turn on the NameVirtualHost directive
turn on the NameVirtualHost directive
My book Linux Bible 9/e : Chapter 17: Configuring a Web Server
says for Virtual host conf the below ... well in what file is this to turn it ON:
turn on the NameVirtualHost directive.
???
"
To use name-based virtual hosting, turn on the NameVirtualHost directive. Then add as
many VirtualHost containers as you like. Here’s how to configure a virtual host:
After you enable NameVirtualHost, your default DocumentRoot (/var/www/html) is no longer used if someone
accesses the server by IP address or some name that is not set in a VirtualHost container. Instead, the first
VirtualHost container is used as the default location for the server.
1. In Fedora or RHEL, create a fi le named /etc/httpd/conf.d/example.org.conf using this template:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@example.org
ServerName www.example.org
ServerAlias web.example.org
DocumentRoot /var/www/html/example.org/
DirectoryIndex index."
says for Virtual host conf the below ... well in what file is this to turn it ON:
turn on the NameVirtualHost directive.
???
"
To use name-based virtual hosting, turn on the NameVirtualHost directive. Then add as
many VirtualHost containers as you like. Here’s how to configure a virtual host:
After you enable NameVirtualHost, your default DocumentRoot (/var/www/html) is no longer used if someone
accesses the server by IP address or some name that is not set in a VirtualHost container. Instead, the first
VirtualHost container is used as the default location for the server.
1. In Fedora or RHEL, create a fi le named /etc/httpd/conf.d/example.org.conf using this template:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@example.org
ServerName www.example.org
ServerAlias web.example.org
DocumentRoot /var/www/html/example.org/
DirectoryIndex index."
Re: turn on the NameVirtualHost directive
Yes, but your *clients* need to address the server by name and not by ip address. The name they use has to be known by hte server as its own.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: turn on the NameVirtualHost directive
what you mean?
Leave all like are but create this file:
/etc/httpd/conf.d/example.org.conf
and add below to this ^^^ file? or is any other conf file that must add the: turn on the NameVirtualHost directive.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@example.org
ServerName www.example.org
ServerAlias web.example.org
DocumentRoot /var/www/html/example.org/
DirectoryIndex index."
Leave all like are but create this file:
/etc/httpd/conf.d/example.org.conf
and add below to this ^^^ file? or is any other conf file that must add the: turn on the NameVirtualHost directive.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@example.org
ServerName www.example.org
ServerAlias web.example.org
DocumentRoot /var/www/html/example.org/
DirectoryIndex index."
Re: turn on the NameVirtualHost directive
The line:
...turns on Apache's ability to serve websites by name on port 80. In this case, the asterisk means Apache will serve websites through any IP address enabled in networking on the server.
The default config file for apache is: /etc/httpd/conf/httpd.conf
At the bottom of that file, it has:
Which will load files in that folder, each site gets its own config file.
So yes, you have the right idea, the settings for your site go into a file called example.org.conf which you create (replace example.org with your actual domain name), inside of conf.d folder.
You have to restart httpd to apply any changes you make to those conf files.
Code: Select all
NameVirtualHost *:80
The default config file for apache is: /etc/httpd/conf/httpd.conf
At the bottom of that file, it has:
Code: Select all
# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
So yes, you have the right idea, the settings for your site go into a file called example.org.conf which you create (replace example.org with your actual domain name), inside of conf.d folder.
You have to restart httpd to apply any changes you make to those conf files.
Re: turn on the NameVirtualHost directive
NameVirtualHost *:80
this ^^ line should be
in /etc/httpd/conf/httpd.conf
or in /etc/httpd/conf.d/example.org.conf ?
should included in both is error? so only in one file ... in other words during the call of conf files run only one?
this ^^ line should be
in /etc/httpd/conf/httpd.conf
or in /etc/httpd/conf.d/example.org.conf ?
should included in both is error? so only in one file ... in other words during the call of conf files run only one?
Re: turn on the NameVirtualHost directive
I think you already have name based virtuial hosts active but in order for them to work your clients must address the server by name and not by ip address.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: turn on the NameVirtualHost directive
You only need to specify NameVirtualHost in /etc/httpd/conf/httpd.conf
Servers host websites on port 80 (http) and port 443 (https for SSL) so our httpd.conf has these two entries:
Servers host websites on port 80 (http) and port 443 (https for SSL) so our httpd.conf has these two entries:
Code: Select all
NameVirtualHost *:80
NameVirtualHost *:443
Re: turn on the NameVirtualHost directive
IN
/etc/httpd/conf/httpd.conf
I CAN NOT FIND NEITHER COMMENTED
NameVirtualHost *:80
NameVirtualHost *:443
WHERE TO ADD THESE LINES ... ?
WHAT LINES MUST FOLLOW THESE TWO in httpd.conf ... ?
/etc/httpd/conf/httpd.conf
I CAN NOT FIND NEITHER COMMENTED
NameVirtualHost *:80
NameVirtualHost *:443
WHERE TO ADD THESE LINES ... ?
WHAT LINES MUST FOLLOW THESE TWO in httpd.conf ... ?
Re: turn on the NameVirtualHost directive
Where find and install CLI BROWSERS for CentOS 7 --- what serach in man pages...
AKA TEXT BROWSERS RUN IN LINUX SHELL --- I mean find web pages via cmds in cli and not gui... and show only some text in shell cli window...
???
I did a Linux CENTOS7 course but forgot SINCE... how install and how find them...
AKA TEXT BROWSERS RUN IN LINUX SHELL --- I mean find web pages via cmds in cli and not gui... and show only some text in shell cli window...
???
I did a Linux CENTOS7 course but forgot SINCE... how install and how find them...