Last active
June 5, 2019 22:12
-
-
Save tttimur/813e7716e3e49c2243b4d02c273fe13b to your computer and use it in GitHub Desktop.
New custom server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1 | |
-- | |
Create new user | |
Step 2 | |
-- | |
Add user to mysql | |
`CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';` | |
`GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';` | |
`FLUSH PRIVILEGES;` | |
Step 3 | |
-- | |
Create `html` folder in user | |
Step 4 | |
-- | |
delete /var/www/html then symlink html folder in /var/www/ | |
`sudo ln -s /home/user/web/html /var/www/` | |
Step 5 | |
-- | |
Updat permissions, note www-data is the user or group! | |
`chmod 755 /var/www/html` | |
`sudo chown -R www-data /home/user/html` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment