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

How to support apache in Linux server

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

Share

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

How to support apache in Linux server? I believe many inexperienced people don't know what to do about it. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Apache supports cgi

1. Open the Apache configuration file httpd.conf, search for "cgi", find the following paragraph, and remove the "#" before "addhandler". This enables the cgi function of Apache.

[root@localhost ~] # gedit / etc/httpd/conf/httpd.conf

# AddHandler allows you to map certain file extensions to "handlers":

# actions unrelated to filetype. These can be either built into the server

# or added with the Action directive (see below)

#

# To use CGI scripts outside of ScriptAliased directories:

# (You will also need to add "ExecCGI" to the "Options" directive.)

#

AddHandler cgi-script .cgi

2. The directory of cgi is "/ var/www/cgi-bin/". Create a test file "test.cgi" here and enter the following

[root@localhost ~] # touch / var/www/cgi-bin/test.cgi

#! / usr/bin/perl

Print "Content-type: text/html\ n\ n"

Print "hello cgi"

3. Change the right of "cgi-bin" to 777

[root@localhost] # chmod-R 777 / var/www/cgi-bin

4. Type "127.0.0.1/cgi-bin/test.cgi" in the browser to see the following result

A Linux learning platform has been made, and a prototype has come out at present, which you can refer to and use.

Link: https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ password: n7bk

After reading the above, have you mastered the method of how apache is supported in Linux server? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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