apache运行出现错误

问题遇到的现象和发生背景

下载apache以在网页中显示python脚本时出现错误

我的解答思路和尝试过的方法

1.配置好apache后,我将需要显示的文件放在Apache24/cgi-bin文件夹下,结果显示
Forbidden
You don't have permission to access this resource.
2.在尝试各种方法无果后,我尝试在根目录下增加“.htaccess”文件,文件源码如下:

RewriteEngine On
 
# The RewriteBase / instruction is commented. Remove the "#" to uncomment
# RewriteBase /
 
# Memory Limit
# php_value memory_limit 256M
# php_value max_execution_time 18000
 
# Disable Hotlinking
# Replace "domain.tld" with your domain name
# Don't forget to add a picture "thepic.gif" on your server 
# RewriteCond %{HTTP_REFERER} !^http://(.+\.)?domain\.tld/ [NC]
# RewriteCond %{HTTP_REFERER} !^$
# Solution 1 : Displays another picture from an URL
# RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://www.domain.tld/thepic.gif [L]
# Solution 2 : Displays a 403 forbidden
# RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
 
# Forces the "www"
# RewriteCond %{HTTP_HOST} !^www\.yourdomain\.tld$ [NC]
# RewriteRule ^(.*)$ http://www.yourdomain.tld/$1 [QSA,L,R=301]
 
# Uncomment these lines to display the off.html page to other IP than the one bellow
# RewriteCond %{REMOTE_ADDR} !^127.0.0.1$
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(.*) off.html
 
# DO NOT MODIFY ANY FOLLOWING LINE
 
# Iemis Rules
# Keep these lines even in maintenance mode, to have an access to the website
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1
#RewriteCond %{HTTP_HOST} !^(www)\. [NC]
#RewriteRule ^(.*)$ index.php/$1 [L,QSA]
#RewriteRule ^(.*)$ index.php/$1 [L,P]
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(application|modules|plugins|system|themes) index.php?/$1 [L]

结果出现错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
多番尝试仍无法解决

我想要达到的结果

如何正确运行Apache?难道是有软件版本的要求?

问题1、主要查看下路径和权限问题
需注意几个点:把 "${INSTALL_DIR}/www" 换成 "C:/wamp64/www"  成实际的目录位置。
关键配置:Require all granted
httpd-vhosts.conf

问题2、
思路1:

  1. 打开 httpd.conf
  2. 找到 mod_rewrite.so 行,将前面的注释打开(即删掉前面的'#'符号)。
  3. 关闭httpd.conf,重启apache服务器即可。
    思路2:
    httpd.conf 中找到你网站目录对应的Directory 行,将其中的 RewriteEngine 项设置为 'ALL'。
    参考链接:https://www.cnblogs.com/niewd/p/15402221.html
    参考链接:https://blog.csdn.net/xst686/article/details/9190061?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-9190061-blog-105229541.pc_relevant_3mothn_strategy_and_data_recovery&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-9190061-blog-105229541.pc_relevant_3mothn_strategy_and_data_recovery&utm_relevant_index=1

看看这个,好像绕过了apache
【python CGI编程(浏览器端运行配置)】https://mbd.baidu.com/ma/s/loNIXs8U

网络有关?