Reverse proxy

Andy HsuGuideInstallGuideAbout 1 min

Reverse proxy

The program listens to port 5244 by default. If you do reverse proxy, recommended you set site_url so that alist can works fine.

If you want to use a sub folder, refer to reverse proxy with sub folder


Add in the server field of the website configuration file

location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Range $http_range;
	  proxy_set_header If-Range $http_if_range;
    proxy_redirect off;
    # the max size of file to upload
    client_max_body_size 20000m;


If you use the bt.cnopen in new window, be sure to delete the following default configuration

  • location ~ ^/(.user.ini|.htaccess|.git|.svn|.project|LICENSE|
  • location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
  • location ~ .*.(js|css)?$


Add the anti-generation configuration item ProxyPass under the VirtualHost field, such as:

<VirtualHost *:80>
    DocumentRoot /www/myapp/public

    AllowEncodedSlashes NoDecode
    ProxyPass "/" "" nocanon


Add the reverse_proxy configuration item reverse_proxy under the Caddyfile file, for example:

:80 {

A simple demonstration of setting up a reverse proxy in Pagoda

First create a new site, Alist Launcher does not matter whether it is in the site folder, and then add it as shown in the figure below.

  • Also, if you want to use Pagoda to open SSL(HTTPS), you need to add it before the reverse proxy, otherwise you cannot open SSL
  • If you have already added a reverse proxy, you can stop it first (the one in the picture that turns on the proxy button can just turn it off), enable SSL and then turn on the reverse proxy