Moving a site on Media Temple MT dedicated virtual DV server
Permalink
Hey guys,
I just finished moving my site over to my dedicated virtual server with mediatemple.
This server is running Plesk and FastCGI, so I wanted to share a few issues I came across and how I fixed them to save some of you some time in the future in case you run into these issues.
At first, I could not write to folders and the permissions were locking up. So I did the following....
You'll first need to enable root access and set the root password via your AccountCenter.
Enable root access:
http://wiki.mediatemple.net/w/DV:Enable_root_access...
Run PHP as FastCGI and resolve Apache permission errors:
http://wiki.mediatemple.net/w/DV:Run_PHP_as_FastCGI_and_resolve_Apa... rrors
Once you implement this, you can run this command to update the ownership and permissions to 'standard' values. Note that some adjustments may need to be made depending on your application. Generally, files should be '644' (rw-r--r--) and directories should be '755' (rwxr-xr-x); Files with secrets (such as database passwords) should be 400 or 600 (r-------- or rw-------). You can use this command as root via SSH to properly set ownership and permissions:
cd /var/www/vhosts/jordanwlee.com/httpdocs && chown -R jordanwlee:psacln * && find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
Once this was resolved, I discovered I encountered session errors on the server. So to address this I did the following:
http://kb.mediatemple.net/questions/652/%28dv%29+Session+Save+Path+... he+Vhost.conf
Keep in mind, in Terminal, you can save changes by using
To help you out, I am including a link to a tutorial on the "vi" editor on your (dv) Dedicated-Virtual Server. This should help you out with the task you are trying to accomplish:
http://wiki.mediatemple.net/w/DV:Use_vi_to_edit_files...
After trying this, I was still getting the session error messages on all of my pages. I found an alternate work-around for this by modifying the permissions on the original session folder (/var/lib/php/session, setting it to 1777 -- this is still secure).
The biggest issue was encountering a "No input file specified" once I had moved over the site and got everything installed.
I am currently running 5.4.1 with this site and I wanted to enable pretty urls instead of having index.php in the URL path. I could rework the .htaccess file but it would only refresh to the homepage or I could view all the pages of the site without pretty urls. I found a workaround on this forum to edit the .htaccess file, but it wasnt working on the Media Temple server.
My Fix:
In concrete/libraries/request.php
Replace line 72
with this code
And make your .htaccess file have this code
After many hours of troubleshooting and contacting mediatemple for support, this was the best fix and now everything is working correctly. I hope that this thread can serve as a resource for people who may encounter these issues later on while using MediaTemple or any similar host running Plesk.
Oh and if you want to check out my site, it's jordanwlee.com
I just finished moving my site over to my dedicated virtual server with mediatemple.
This server is running Plesk and FastCGI, so I wanted to share a few issues I came across and how I fixed them to save some of you some time in the future in case you run into these issues.
At first, I could not write to folders and the permissions were locking up. So I did the following....
You'll first need to enable root access and set the root password via your AccountCenter.
Enable root access:
http://wiki.mediatemple.net/w/DV:Enable_root_access...
Run PHP as FastCGI and resolve Apache permission errors:
http://wiki.mediatemple.net/w/DV:Run_PHP_as_FastCGI_and_resolve_Apa... rrors
Once you implement this, you can run this command to update the ownership and permissions to 'standard' values. Note that some adjustments may need to be made depending on your application. Generally, files should be '644' (rw-r--r--) and directories should be '755' (rwxr-xr-x); Files with secrets (such as database passwords) should be 400 or 600 (r-------- or rw-------). You can use this command as root via SSH to properly set ownership and permissions:
cd /var/www/vhosts/jordanwlee.com/httpdocs && chown -R jordanwlee:psacln * && find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
Once this was resolved, I discovered I encountered session errors on the server. So to address this I did the following:
http://kb.mediatemple.net/questions/652/%28dv%29+Session+Save+Path+... he+Vhost.conf
Keep in mind, in Terminal, you can save changes by using
:x!
To help you out, I am including a link to a tutorial on the "vi" editor on your (dv) Dedicated-Virtual Server. This should help you out with the task you are trying to accomplish:
http://wiki.mediatemple.net/w/DV:Use_vi_to_edit_files...
After trying this, I was still getting the session error messages on all of my pages. I found an alternate work-around for this by modifying the permissions on the original session folder (/var/lib/php/session, setting it to 1777 -- this is still secure).
The biggest issue was encountering a "No input file specified" once I had moved over the site and got everything installed.
I am currently running 5.4.1 with this site and I wanted to enable pretty urls instead of having index.php in the URL path. I could rework the .htaccess file but it would only refresh to the homepage or I could view all the pages of the site without pretty urls. I found a workaround on this forum to edit the .htaccess file, but it wasnt working on the Media Temple server.
My Fix:
In concrete/libraries/request.php
Replace line 72
$path = Request::parsePathFromRequest('ORIG_PATH_INFO');
with this code
$path = Request::parsePathFromRequest('REDIRECT_URL'); if (!$path) { $path = Request::parsePathFromRequest('ORIG_PATH_INFO'); }
And make your .htaccess file have this code
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !(index\.php) RewriteRule .* index.php [L] </IfModule>
After many hours of troubleshooting and contacting mediatemple for support, this was the best fix and now everything is working correctly. I hope that this thread can serve as a resource for people who may encounter these issues later on while using MediaTemple or any similar host running Plesk.
Oh and if you want to check out my site, it's jordanwlee.com