Skip to content

Instantly share code, notes, and snippets.

@tttimur
Last active June 5, 2019 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tttimur/813e7716e3e49c2243b4d02c273fe13b to your computer and use it in GitHub Desktop.
Save tttimur/813e7716e3e49c2243b4d02c273fe13b to your computer and use it in GitHub Desktop.
New custom server
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