Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vhost support for PHPList #66

Open
joglomedia opened this issue Nov 29, 2019 · 0 comments
Open

Add vhost support for PHPList #66

joglomedia opened this issue Nov 29, 2019 · 0 comments
Labels
new feature request New feature request / suggestion

Comments

@joglomedia
Copy link
Owner

Introduction

phpList is Open Source newsletter and email marketing software.

Official download site

https://www.phplist.org/download-phplist

Current latest version

https://sourceforge.net/projects/phplist/files/latest/download
https://github.com/phpList/phplist3

Installation

https://www.phplist.org/manual/books/phplist-manual/page/installing-phplist-manually#bkmrk-download-phplist

wget -q -O phplist.zip https://sourceforge.net/projects/phplist/files/latest/download
unzip -qq phplist.zip
mv phplist-*/ webapps/phplist.your-domain.com

Sample Nginx directives

server {
            listen 80;
            server_name example.com;

            root /var/www/phplist/public_html/lists;
            index index.php;

            access_log <<log file>>;
            error_log <<log file>>;

            charset utf-8;

            location ~* \.(txt|log|inc)$ {
                allow 127.0.0.1;
                deny all;
            }

            location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
              expires max;
              log_not_found off;
           }

            #block phplist config directory
            location /config {
                deny all;
            }

            #per the phplist .htaccess these are the only public allowed php files
            location ~* (index\.php|upload\.php|connector\.php|dl\.php|ut\.php|lt\.php|download\.php)$ {
                   fastcgi_split_path_info ^(.|\.php)(/.+)$;

                   include /etc/nginx/fastcgi_params.conf; #standar fastcgi config file
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                   fastcgi_intercept_errors on;
                   fastcgi_pass 127.0.0.1:9000;
            }


            #block all other php file access from public
            location ~ \.php$ {
               deny all;
            }

}
@joglomedia joglomedia added the new feature request New feature request / suggestion label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature request New feature request / suggestion
Projects
None yet
Development

No branches or pull requests

1 participant