Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of the method of setting and binding apache Domain name in Lamp Environment

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This paper gives an example of how to set up a binding apache domain name in Lamp environment. Share with you for your reference, the details are as follows:

Enter the apache configuration directory first

[root@iZ233vkrtsiZ local] # cd / usr/local/apache/conf/vhost

Then find the configuration of your website. Take this site as an example

[root@iZ233vkrtsiZ vhost] # vim www.eyblog.com.confServerAdmin webmaster@example.comphp_admin_value open_basedir "/ home/wwwroot/www.eyblog.com:/tmp/:/var/tmp/:/proc/" DocumentRoot "/ home/wwwroot/www.eyblog.com" ServerName www.eyblog.com ServerAlias eyblog.comErrorLog "/ home/wwwlogs/www.eyblog.com-error_log" CustomLog "/ home/wwwlogs/www.eyblog.com-access_log" common SetOutputFilter DEFLATE Options FollowSymLinks AllowOverride All Order allow,deny Allow from all DirectoryIndex index.html index.php

Just modify the corresponding parameters.

PidFile logs/httpd.pid # the process number file location of the first httpd process (the parent of all other processes). The port number on which the Listen 80 # server is listening. ServerName www.eyblog.com:80 # main site name (the hostname of the website) ServerAlias # alias, which can be the email address of multiple domain name ServerAdmin admin@clusting.com # administrators. DocumentRoot "/ mnt/web/clusting" # the web page storage location of the main site.

Options: configure which features to use in a specific directory. The common values and basic meanings are as follows:

ExecCGI: CGI scripts are allowed to be executed in this directory.

FollowSymLinks: allows file systems to use symbolic connections in this directory.

Indexes: when a user accesses this directory, if the user cannot find the home page file specified by DirectoryIndex (for example, index.html), the list of files in that directory is returned to the user.

SymLinksIfOwnerMatch: when using symbolic links, they can be accessed only if the owner of the symbolic link is the same as the owner of the actual file.

AllowOverride: allow instruction types to exist in .htaccess files (the file name of .htaccess file can be changed and its file name is determined by the AccessFileName directive):

None: when AllowOverride is set to None. Do not search for .htaccess files in this directory (you can reduce server overhead).

All: all directives can be used in the .htaccess file.

Order: controls which of the two access rules, Allow or Deny, take precedence during access:

Allow: list of hosts that are allowed to access (available domain names or subnets, for example: Allow from 192.168.0.0and16).

Deny: list of hosts denied access.

The number of httpd processes started when StartServers 5 # started Apache. The minimum number of idle processes held by the MinSpareServers 5 # server. The maximum number of idle processes held by the MaxSpareServers 10 # server. MaxClients 150 # maximum number of concurrent connections. MaxRequestsPerChild 1000 # how many times each child process is requested for service and then kill is dropped. 0 means there is no limit, and the recommended setting is 1000.

It is hoped that what is described in this article will be helpful to the setting operation of Apache server in Lamp environment.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report