media temple: php.ini on dv
10 Sep
The php.ini is located at : /etc/php.ini
DON’T edit the other one you find, it belongs to plesk
extensions are at: /usr/lib/php4
Hope this help who ever was searching for it
10 Sep
The php.ini is located at : /etc/php.ini
DON’T edit the other one you find, it belongs to plesk
extensions are at: /usr/lib/php4
Hope this help who ever was searching for it
9 Sep
last night i wasn’t able to access my server via ssh on plesk, but i could access all of my / clients other dv servers. I just put in a ticket like 20 minutes ago, and they’ve already responded, on top of which they told me about something they noticed on the server. Nothing big, just a little hey this might help the server run a lil bit smoother for you type thing. Thanx to Sean O’Brien.
In the end it was a vista issue, and I closed the ticket with the fix in case any other users encounter it. Tell me thats not good support, about two weeks ago i had to contact support 3days in a row because there was a server that kept crashing. they we’re always there, helped pin point the issue, and we we’re fine since. other than a plesk maintence process that kept forgetting to terminate, which they actually fixed before I mentioned it!
Anyways as always nothing but love for (mt)
4 Sep
I’ve gotten a few hit’s this morning looking for answers about plesk and mysql. I’m guessing they we’re trying to figure out how plesk handles mysql.
manual changes
Simply put plesk will only work for mysql via it’s web frontend. (should note, i’m referring to listing db’s and users). Plesk actually has no awareness of your actual mysql db. what i mean by this is that if you manually make changes to mysql, they won’t be reflected in plesk.
updating plesk’s domain database’s tables
if you go to the master phpadmin interface you’ll see a database for plesk that has tables that tell it about your databases. after adding a database you’ll have to update this db with the proper associations (domain, client).
no root
Another gotta is that root won’t work on a mysql server setup by plesk. You’ll have to access the database as ‘admin’ using the same password used to access plesk.
adding db’s and users manually, via sql
I don’t know if plesk suports mysql 5, or maybe i just have a really old version. the only way to add a user is via grant. the new ways are not supported. you can add a db as normal, but will need to be ‘admin’ to do it.
last thoughts
If your doing anything manually, document it, and just don’t worry about adding it to plesk. I’ve killed the elsid server a few times playing around with the plesk tables to so that they would reflect a manual change i did.
Seriously it’s touchy, you can change everything back to how it was, and plesk will somehow remember that you touched it. If you go with plesk either do as much as you can via plesk, and handle the rest by hand, or do everything via hand, and let plesk sit there until you can’t get a terminal.
Hopefully this helps.
3 Sep
setting up a catch domain in plesk takes a little bit more than just wild card dns.
enarion.net has a how to covering the final steps
In this article you’ll learn to configure Plesk that it uses one subdomain as catch-all for all non-existing subdomains.
Why would you need catch all subdomainsMaybe you have a few subdomains. But sometimes your visitors are accessing non-existing subdomains. So the best solution would be to either redirect them to your main website or at least show them a list of available pages.
Here comes the catch-all subdomain : There you can either configure Apache that it redirects all accesses to the main webpage (via 301, as written e.g. in this article Migrate domain names with .htaccess ) or just have a static (or dynamic, of course) page displayed to the user.
check it out :
http://enarion.net/web/plesk/plesk-catchall-subdomains/
29 Jul
ok well after stayng up for most of this weekend i’m still gonna end up having to use what i already had yesterday. but maybe my time wasted can help someone out there.
1. plesk’s cmd line subdomain creator does not tie into dns. so after slaving to have everything work perfectly with plesk – this is just another hill to conquer.
2. with the default mysql / plesk setup you have to use grant to add a user
3. there are there tables in the psa database that contain the info needed to display a subdomain in a users subdomain panel.
heres the code that finally worked for me
function processOnServer($clientName){
global $baseDir;
//make our password using the user name and adding some md5 salt to the tail
//each password must be unique, as it's how we'll find the ids later
$pass=md5($clientName);
$passLen=13-strlen($clientName);
$passEnd=substr($pass,0,$passLen);
$password=$clientName.$passEnd;
//setup the client dir location
$clientDir=$baseDir.$clientName;
$dbConn = mysql_connect('db_server', 'user', 'pass');
if (!$dbConn) {
die('Could not connect: ' . mysql_error());
}
$dbName=$clientName."_trac";
//create db
$sql = "CREATE DATABASE $dbName";
mysql_query($sql, $dbConn);
//select mysql db
mysql_select_db("mysql",$dbConn);
//add client user
$sql="GRANT ALL ON $dbName.* TO '$clientName' IDENTIFIED BY '$password'";
mysql_query($sql, $dbConn);
//select plesk db
/*plesk configuration - i'm leaving this till another day
mysql_select_db("psa",$dbConn);
//add account
$sql="INSERT INTO `accounts` (`id`, `type`, `password`) VALUES (NULL, 'plain', '$password')";
mysql_query($sql, $dbConn);
///find the new users id
$sql="SELECT id,password FROM accounts WHERE password = '$password' ORDER BY id DESC";
$findAccountId=mysql_query($sql, $dbConn);
list($newId) = mysql_fetch_row($findAccountId);
//add user to plesk for subdomain
$sql="INSERT INTO `sys_users` (`id`, `login`, `account_id`, `home`, `shell`, `quota`) VALUES (NULL, '$clientName', $newId, '$clientDir', '/bin/false', 0)";
mysql_query($sql, $dbConn);
//find the new new id
$sql="SELECT id,account_id FROM sys_users WHERE account_id=$newId ORDER BY id DESC";
$findAccountId2=mysql_query($sql, $dbConn);
list($newerId) = mysql_fetch_row($findAccountId2);
//add subdomain to plesk
$sql="INSERT INTO `subdomains` (`id`, `dom_id`, `name`, `displayName`, `sys_user_type`, `sys_user_id`, `ssi`, `php`, `cgi`, `perl`, `python`, `fastcgi`, `miva`, `coldfusion`, `asp`, `asp_dot_net`, `ssl`, `same_ssl`) VALUES (NULL, 1, '$clientName', '$clientName', 'native', $newerId, 'false', 'true', 'false', 'false', 'false', 'false', 'false', 'false', 'false', 'false', 'true', 'false')";
mysql_query($sql, $dbConn) or die('Could not connect: ' . mysql_error());
*/
//make config file
$fileName = md5($clientName);
makeApacheFiles($clientName,$fileName.".conf");
makeTracFiles($clientName,$fileName.".ini",$password);
makeAuthFiles($clientName,$fileName.".authz");
//finish the svn and trac setup
passthru("shell_script $clientName $password $fileName");
}the codes choppy (i’ve been up for over 30 hours – so i’m sure it looks worse to use
)
the system i’ve built uses a custom frontend app to create, manage subdomains, and do automated installs of svn repos / trac, etc.
if you look over that code you’ll see there’s three psa tables that need fixing to allow your client to also view your subdomains in plesk.
also the ftp fix mentioned on there site won’t work on mediatemple. when i find one i’ll post it.
in addtional to all this. the psa database is only a place holder for the frontend, and in no way reflects the actually server (unless you do everything from plesk)
if you add a db or a dns record you’ll have to also update the psa db.
don’t know if i’m still making sense, off to bed – sid
28 Jul
if your like me and keep having to run a find for the path to the plesk command line apps. Heres the path : /usr/local/psa/admin/sbin/
19 May
ok i’ve been on media temple on and off since about 2000? I originally learned about them because alot of the original big flash guys seemed to all be on them.
Then for awhile they had design / development branch ( loved that site ). And now i host only with them after continuously bouncing around to way to many hosts to mention and always coming back to them. at one point i had about 5 of my personal domains on 6 different hosts ( i know the numbers don’t match – i was trying something ).
That said i don’t recommend EVER using their domain name service ( long story ).
I’ve been on their grid, dv, had a low end dedicated once for a month, and pretty much every shared plan they used to offer before the grid.
I like that they offer great backend interfaces(whter their own, plesk, account center, etc). love the speed. support has never been anything but awesome. dv is a true vps, not a low budget attempt. to say i’ve always been happy with media temple is an understatement.
they are a developer designer focused company, they know you want the best and try and give it you.
i’ll stop my rant here, but saw that appearently someone came from google withthe keywords why media temple sucks. so figured i’d try and let it be known thats search tag, not mine – lol
–sid out
17 May
It appears people are coming to the site to pages that are completely unrelated to there searches? because i’ve got myspace tags on posts about video servers, and flash tags on posts about setting up plesk…..
it’s only been a day, so i’ll wait and see how this little experiment works out.
16 May
I covered svn setup on media temple dv and similar centos with plesk setups here : http://elsid.net/2007/05/07/setup-svn-server-on-media-temple-dv-or-centos-with-plesk/
Now i’ll cover the basics of setting up trac on media temple dv and similar centos with plesk setups. Please note this is what worked for me (and should work for other media temple dv setups). Please let me know if i missed something, or any recommendations.
first steps
First you need to request root access and the developer tools package. Once that’s done we’re ready to start.
This setup will use mysql for the trac database and serve trac from a subdomain. I’m only covering the setup of a vanilla trac installation
You can take a look at the trac install guide here : http://trac.edgewall.org/wiki/TracInstall
Preq’s / What you’ll need:
clear silver :
setup tools :
mysqldb:
python:
mod_python:
svn:
More pre-install steps
I covered svn setup here : http://elsid.net/2007/05/07/setup-svn-server-on-media-temple-dv-or-centos-with-plesk/
svn must be rebuilt to work correctly with trac. http://trac.edgewall.org/ticket/3706#comment:10 .
First we need to edit the svn makefile.
change : SVN_APR_LIBS = /root/subversion-1.4.3/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl
to : SVN_APR_LIBS = /root/subversion-1.4.3/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto
replace /root/subversion-1.4.3 with what ever is the path in your file.
now run make clean, then make, and make install
Almost done. We’ll build swig and then move to our trac setup. in your subversion build folder do the following.
make swig-py
make install-swig-py
make swig-py install
If you’ve installed all the preq’s, rebuilt svn, and built swig we should be ready to install trac.
–note : you may need to copy the svn and libsvn folder from /usr/local/lib/svn-python to /usr/lib/python/site-packages. remember copy not move.
Install trac
Install Trac
python ./setup.py install
Setup Project
go to plesk and setup a subdomain for trac. Make sure you only select python support.
now setup a mysql database at the same domain you made your trac subdomain at. Add a user for this database and we’re almost home.
make the following directorys :
/var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/test
/var/www/vhosts/yourdomain/subdomains/yoursubdomain/svn/test
setup a project : trac-admin /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/test initenv
setup a test svn for this project : svnadmin create /var/www/vhosts/yourdomain/subdomains/yoursubdomain/svn/test
make a sub directory in our trac directory and chmod 0777 it, we’ll need this later: mkdir /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/plugins
chmod 0777 /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/plugins
be sure to check the permissions on your svn and trac directory, we need to be sure apache is able to access and run our files.
go to the conf directory for your subdomain : cd /var/www/vhosts/yourdomain/subdomains/yoursubdomain/conf
almost done make a file : vhost.conf
Open this file and add the following, remember to fix the paths to your domain and subdomain:
SetEnv PYTHON_EGG_CACHE /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/plugins
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/test
PythonOption TracUriRoot /
PythonInterpreter main_interpreter
Final Steps
restart apache : /usr/local/psa/admin/sbin/websrvmng -a -v
point your browser to your trac subdomain. If everything is working fine you’ll see a trac page. If not you’ll see a 500 error page.
Got Problems?
If your seeing an error page you should take the following steps:
go to plesk >> yourdomain >> log manager >> error log
copy the portion that contains your error and remove the servers timestamps and ip data.
do a google on the very last line, this will contain the error message. You’ll likely see a result from the trac website. if not add the word trac before your search.
If you still see no results from the trac website, go to the site and search the tickets. Still no luck? open a new ticket. Trac is very good with support and the community is extremely helpful.
References / helpful Links
http://trac.edgewall.org/wiki/TracGuide
http://trac.edgewall.org/ticket/3706#comment:10
http://trac.edgewall.org/ticket/4459#comment:21
If you need help you can contact me, but i’d recommend using the trac community as i’m not fluent with python.
happy coding – sid
7 May
I’m saving this here for my ref:
This walk through covers setting up a svn server on media temples dedicated virtual servers (dv) or similarly configured centos with plesk installations.
With media temple the yum command isn’t available so we have to do it the long way
first go to http://subversion.tigris.org/project_packages.html
Download the source for both subversion and dependencies. make sure you download them both to the same directory
you can do this using wget, ex : wget file_location
ok now extract both archives – use google if you don’t know how
almost done, now lets get it installed
first cd (change directory) into the subversion folder, then run the following commands
./configure --with-apxs=/usr/sbin/apxs make make install
This will configure with apache support, build and install. now all thats left is setting up apache and a domain, but before we get to it, check your httpd.conf file and make sure you see the following modules being loaded :
mod_dav_svn mod_authz_svn
I prefer to use a subdomain and recommend it, ex: trac.domain = trac frontend, svn.domain=regular svn access. It’s up to you. the steps for setting up a subdomain and domain are pretty much the same, so i’ll only cover subdomains.
Login to plesk, select the domain you plan on using. go to subdomains > add new
ok here we want to setup a new subdomain. remember to give this subdomain a different ftp account that the main site.
save this domain, check that it’s up and running , and exit plesk.
almost done ![]()
login to your servers file system go to /var/www/vhosts/your_domain/subdomains/your_subdomain/
now we need to setup a svn repo.
first make a new directory for our repo , I recommend making it your subdomains dir, ex
mkdir /var/www/vhosts/your_domain/subdomains/your_subdomain/svn/repo;
chmod 0777 /var/www/vhosts/your_domain/subdomains/your_subdomain/svn/repo;
svnadmin create /var/www/vhosts/your_domain/subdomains/your_subdomain/svn/repo;
next cd into your conf directory at /var/www/vhosts/your_domain/subdomains/your_subdomain/conf
vi vhost.conf
and enter :
#svn.server.com — vhost.conf file
<location />
DAV svn
SVNPath /var/www/vhosts/your_domain/subdomains/your_subdomain/svnrepo
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/svn-auth-file
Require valid-user
</location>
ok promise it’s almost over
We need to add a user for access via the apache svn frontend
htpasswd -c /etc/svn-auth-file your_user
now run
/usr/local/psa/admin/sbin/websrvmng -a -v
That restarts apache to load all of our changes.
now go to your_subdomain.your_domain and login – svn is running
Things to keep in mind, I’m only covering media temple dv, and similar centos with plesk configurations. I’m not covering security, i’ve not covering trac, getting your repo setup, etc. So this is a vanilla install. – use google and make it more.
Articles I used :