0

I'm fairly new to the whole Linux Server thing but one of my websites has grown to the point that I'm moving to a dedicated hardware virtual-server instead of using a web-hosting service.

I'm running Ubuntu 16.04 and I've installed Apache, MySQL, and PhP through the apt-get commands. In order to get to my SSD i simply navigate to /ssd/

How do I make sure that all of my web stuff is running on the SSD and not the HDD the operating system is installed on.

Hobbyist
  • 11
  • 1

1 Answers1

1

You just need to make sure that your document root is after /ssd on your VirtualHost definition.

example:

DocumentRoot /ssd/wwwroot

also for mysql you would need to edit the /etc/my.cnf file to have

[mysqld] 
datadir=/ssd/mysqldata
Wika Rocha
  • 11
  • 3
  • The DocumentRoot being found in one of the conf files usually under /etc/apache2 – hookenz Nov 10 '16 at 23:45
  • in ubuntu this should be the main configuration file /etc/apache2/sites-enabled/000-default.conf – Wika Rocha Nov 11 '16 at 00:05
  • From memory that's a symbolic link to /etc/apache2/sites-available/default.conf But yes you should find the DocumentRoot directive inside it. That determines where the files are that get served up. – hookenz Nov 11 '16 at 00:33
  • This is only a small part of the answer, if "all of my web stuff" includes the database. – Michael - sqlbot Nov 11 '16 at 02:50