Apache httpd2.4是否支持PUT和GET?
我已在centos 7机箱上安装了httpd-2.4.6-89.el7.centos.x86_64,并配置了Web服务器,但无法使http“PUT/POST”或“get”正常工作 下面提到的是我的配置Apache httpd2.4是否支持PUT和GET?,apache,centos,httpd.conf,Apache,Centos,Httpd.conf,我已在centos 7机箱上安装了httpd-2.4.6-89.el7.centos.x86_64,并配置了Web服务器,但无法使http“PUT/POST”或“get”正常工作 下面提到的是我的配置 [root@centos-007 httpd]# cat /etc/httpd/conf.d/centos-007.conf <VirtualHost *:80> ServerName centos-007.gg.com DocumentRoot "/abc/xyz"
[root@centos-007 httpd]# cat /etc/httpd/conf.d/centos-007.conf
<VirtualHost *:80>
ServerName centos-007.gg.com
DocumentRoot "/abc/xyz"
DirectoryIndex index.html
<Location />
Require all granted
Options +Indexes
</Location>
Alias /avaya "/abc/xyz"
<Directory "/abc/xyz">
Require all granted
Dav On
<LimitExcept GET POST OPTIONS>
</LimitExcept>
Options FollowSymLinks Indexes MultiViews
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName centos-007
DocumentRoot /var/www/centos-007/pub_html
<Directory /var/www/centos-007/pub_html>
Options Indexes FollowSymLinks MultiViews
Require all granted
</Directory>
</VirtualHost>
[root@centos-007 httpd]#cat/etc/httpd/conf.d/centos-007.conf
服务器名centos-007.gg.com
DocumentRoot“/abc/xyz”
DirectoryIndex.html
要求所有授权
选项+索引
别名/avaya”/abc/xyz“
要求所有授权
达文
选项如下符号链接索引多视图
服务器名centos-007
DocumentRoot/var/www/centos-007/pub_html
选项索引跟随符号链接多视图
要求所有授权
奇怪的是,当我运行curl命令上传一个文件时,我得到了下面的信息,但是网页上没有显示上传的文件
* About to connect() to centos-007.gg.com port 80 (#0)
* Trying 10.170.110.100...
* Connected to centos-007.gg.com (10.170.110.100) port 80 (#0)
> PUT /avaya HTTP/1.1
> User-Agent: curl/7.29.0
> Host: centos-007.gg.com
> Accept: */*
> Content-Length: 824
> Expect: 100-continue
>
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 18 Jun 2019 13:25:54 GMT
< Server: Apache/2.4.6 (CentOS)
< Location: http://centos-007.wsgc.com/xyx
< Content-Length: 245
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://centos-007.gg.com/xyx">here</a>.</p>
</body></html>
* Closing connection 0
*即将()连接到centos-007.gg.com端口80(#0)
*正在尝试10.170.110.100。。。
*连接到centos-007.gg.com(10.170.110.100)端口80(#0)
>PUT/avaya HTTP/1.1
>用户代理:curl/7.29.0
>主持人:centos-007.gg.com
>接受:*/*
>内容长度:824
>预期:100人继续
>
*正在关闭连接0
我可以使用底层
DavLockDB /var/www/html/DavLock
<VirtualHost *:80>
ServerName centos-007.gg.com
DocumentRoot /abc/xyz
<Location />
Require all granted
Options +Indexes
</Location>
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
Alias /xyz /abc/xyz
<Directory /abc/xyz>
Require all granted
DAV On
AuthType Basic
Require valid-user
</Directory>
</VirtualHost>
DavLockDB/var/www/html/DavLock
服务器名centos-007.gg.com
DocumentRoot/abc/xyz
要求所有授权
选项+索引
ErrorLog/var/log/httpd/error.log
CustomLog/var/log/httpd/access.log组合
别名/xyz/abc/xyz
要求所有授权
达文
AuthType Basic
需要有效用户
这是专门针对…?我所需要的只是能够放置文件,而不是针对模块