PDA

View Full Version : [server] Lamp on secondary drive install



aitkenrob
March 19th, 2018, 09:18 AM
When I installed lamp on my primary drive, I needed to insert my password every time I saved to /var. Can I install it on my secondary drive so I dont have password permission issues?

yancek
March 19th, 2018, 02:31 PM
Installing LAMP on a secondary drive won't resolve that issue. You need to change ownership/permissions on the sub-directories under /var/www/html.

TheFu
March 19th, 2018, 02:31 PM
No. That would break system security and almost all the programs.

You can setup a longer timeout for sudo use, however.

Understanding Unix file and directory permissions is a core skill for anyone using a Linux machine. There are many tutorials.

SeijiSensei
March 19th, 2018, 07:00 PM
You can store the website files anywhere on the server. You just need to change the "DocumentRoot" directive in Apache. For example, suppose I've created a folder in my home directory called /home/seiji/web and put my various .html and .php files there. Then in Apache, I could create a virtual server with the directives



<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /home/seiji/web
[etc.]
</VirtualHost>