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.

1 Answer 1

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
4
  • The DocumentRoot being found in one of the conf files usually under /etc/apache2
    – hookenz
    Nov 10, 2016 at 23:45
  • in ubuntu this should be the main configuration file /etc/apache2/sites-enabled/000-default.conf
    – Wika Rocha
    Nov 11, 2016 at 0: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, 2016 at 0:33
  • This is only a small part of the answer, if "all of my web stuff" includes the database. Nov 11, 2016 at 2:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .