GithubHelp home page GithubHelp logo

lucien144 / lemp-stack Goto Github PK

View Code? Open in Web Editor NEW
66.0 66.0 39.0 111 KB

๐Ÿค– LEMP w/ PHP7.X & MariaDB on Ubuntu 16/17/18 x64

PHP 10.90% Shell 89.10%
essential lemp mariadb munin nginx php php-fpm php7 rabbitmq supervisor vhost

lemp-stack's Introduction

๐Ÿ‘‹ Hey, I'm Honza.

๐Ÿงฐ Fullstack & Mobile Dev
๐ŸŒ† Prague & Sydney
๐Ÿฅณ Chipmunks & Coffee
๐Ÿ“ Currently the tech lead at Circul8

lemp-stack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lemp-stack's Issues

Include basic php configuration

Nginx โ†’ /etc/nginx/sites-available/new-site.tld
client_max_body_size 128M;

PHP โ†’ /etc/php/7.0/fpm/php.ini
upload_max_filesize = 128M

...

Include the logrotate?

Include the logrotate for each vhost in logrotate config?
Renaming the vhost logs to $HOSTNAME-{access,error}.log for better logrotate logging?

include sftp jail

1. Create the sftp group and put desired user to that group.

$ sudo groupadd sftp
$ sudo usermod -g sftp yournewuser

2. Update the SSH settings

$ sudo nano /etc/ssh/sshd_config

Change the /etc/ssh/sshd_config

# override default of no subsystems
#Subsystem      sftp    /usr/lib/openssh/sftp-server
# ๐Ÿ‘‡
Subsystem sftp internal-sftp

Add this to the end of the /etc/ssh/sshd_config

Match group sftp
        X11Forwarding no
        ChrootDirectory %h
        AllowTcpForwarding no
        ForceCommand internal-sftp

3. Check the permissions

โš ๏ธ All directories up to the user root must be owned by root with permissions 755

$ sudo chown root: /var/www/vhosts/USERSHOME
$ sudo chmod 755 /var/www/vhosts/USERSHOME

4. Restart SSH

$ sudo service ssh restart

5. Optional

To disable the bash entirely for this user, you can run $ sudo usermod -s /bin/false USER

Reference: https://shapeshed.com/chroot-sftp-users-on-ubuntu-intrepid/

Disable "rm" in favor to "trash-cli"

Add to the /etc/bash.bashrc
alias rm='echo "This is not the command you are looking for. Use trash-put instead."; false'

Install trash-cli apt install trash-cli

Include basic WordPress settings?

Like if WP is in subdirectory:

        location / {
                try_files $uri /wordpress/index.php?q=$uri&$args;
        }

        location /wordpress {
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }

Implement sendmail?

$ apt-get install -y sendmail
$ sudo sendmailconfig
$ hostname
$ sudo nano /etc/hosts # 127.0.0. localhost localhost.localdomain hostname
$ sudo ufw allow 587
$ sudo service ufw restart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.