Httpd 2.4 поддерживает PUT и GET? - PullRequest
0 голосов
/ 18 июня 2019

Я установил httpd-2.4.6-89.el7.centos.x86_64 на блок CentOS 7 и настроил веб-сервер, однако не могу заставить работать 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"
        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>

Странная часть, когда я запускаю команду 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

1 Ответ

0 голосов
/ 19 июня 2019

Я мог бы получить эту работу, используя базовый

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>
...