In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to configure Apache in SUSE Linux, which is very detailed and has a certain reference value. Friends who are interested must finish reading it!
When installing SUSE, you can choose to install Apache (now the Apache2 version) or install Apache in the SUSE CD. Of course, you can download the * * version of Apache directly in RPM format or manually. Then you can enter the following command in the terminal to operate the Apache (# in the terminal indicates the command prompt, while the # in the file generally indicates a comment):
Start the Apache server:
# / usr/sbin/rcapache2 start
Restart the Apache server:
# / usr/sbin/rcapache2 restart
Stop the Apache server:
# / usr/sbin/rcapache2 stop
Most Web servers don't have just one site, so we need to configure Apache to support virtual hosts. In the new version of SUSE, Apache has been changed to modular, as long as a few simple changes to the configuration file can be established when the account, the site will correspond to the location. There is no need to modify the location of the http.conf to build the corresponding / home one by one, and restart the Apache after construction. The steps are as follows:
1. Modify / etc/sysconfig/apache2
# vi / etc/sysconfig/apache2
Find APACHE_MODULES.
Add vhost_alias to *, save the recompiled apach3 configuration file and let apache2 load the vhost module.
# SuSEconfig-module apache2
two。 Create a new file called vhost.conf in / etc/apache2/vhosts.d/ as follows:
# vi / etc/apache2/vhosts.d/vhost.conf
UseCanonicalName Off
ErrorLog / var/log/apache2/error_log
CustomLog / var/log/apache2/access_log common
VirtualDocumentRoot / home/vhost/%0/public_html
VirtualScriptAlias / home/vhost/%0/public_html/cgi-bin
AddHandler cgi-script .cgi
Options ExecCGI
SetHandler cgi-script
The default should be / home/%0/public_html
There is no "vhost" after / home
For ease of management, create an extra layer of directories so that home looks much cleaner.
3. Modify default-server.conf
Vi default-server.conf
Find ScriptAlias XXXXXX and comment out this paragraph.
# ScriptAlias / cgi-bin/ "/ srv/www/cgi-bin/"
# "/ srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#
# AllowOverride None
# Options + ExecCGI-Includes
# Order allow,deny
# Allow from all
#
If there is no need to create more directories, apache2 restart here can skip the actions in the following 4.
4. If you build one more floor, you will continue to modify the mod_userdir.conf.
# vi mod_userdir.conf
5. Restart apache2
# rcapache2 restart
If you want to set up a website in the future, as long as you set up a new USER, the directory will be built in domain mode directly.
For example
Build the directory of ABC USER / home/vhost/www.xyz.com
Apache will automatically go to the / home/vhost/www.xyz.com/public_html/ directory to read the website materials.
These are all the contents of the article "how to configure Apache for SUSE Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.