从 Apache 切换到 Nginx 的简单方法

从 Apache 切换到 Nginx 的简单方法


我使用 nginx 作为 DAV 服务器,并使用 apache 托管 backuppc 的前端。

我想让 nginx 托管前端,而不是 apache。但我不知道如何将 apache 设置转换为 nginx 设置。你能帮我吗?有没有指南介绍如何将 /etc/apache2/apache2.conf 转换为 /etc/nginx/nginx.conf

尽管 apache2.conf 相当大,但我发现唯一与前端相关的部分。

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
Alias /backuppc /usr/share/backuppc/cgi-bin/

<Directory /usr/share/backuppc/cgi-bin/>
    AllowOverride None
    Allow from all

        # Uncomment the line below to ensure that nobody can sniff importanti
        # info from network traffic during editing of the BackupPC config or
        # when browsing/restoring backups.
        # Requires that you have your webserver set up for SSL (https) access.
        #SSLRequireSSL

    Options ExecCGI FollowSymlinks
    AddHandler cgi-script .cgi
    DirectoryIndex index.cgi

    AuthGroupFile /etc/backuppc/htgroup
        AuthUserFile /etc/backuppc/htpasswd
    AuthType basic
    AuthName "BackupPC admin"
    require valid-user

</Directory>

答案1

有现成的配置这里

相关内容