I installed modx to two different installations. I made a copy of the first modx directory to a different location. So I have something like this:
/var/www/firstsite/modx/
/var/www/secondsite/modx/
This is basically what my httpd.conf in /etc/apache2/ looks like:
ServerName localhost
# Ensure that Apache listens on port 80
#Listen 80
# Listen for virtual host requests on all IP addresses
#NameVirtualHost *
<VirtualHost *>
DocumentRoot /var/www/secondsite/modx/
ServerName secondsite.game-server.cc
# Other directives here
</VirtualHost>
<VirtualHost *>
DocumentRoot /var/www/firstsite/modx/
ServerName firstsite.org
# Other directives here
</VirtualHost>
I then ran the installation for each one at a time via these url’s
http://firstsite.org/install/
http://secondsite.game-server.cc/install/
Each site got its own database in mysql, one named firstsite, the other secondsite, and modx_ was used as the table prefix in both cases.
The problem I am having is when I add an image to a page by uploading the image, it is placed in the wrong asset directory. I.E. the asset directory of the other site. If I am editing content of a page at firstsite.org, and then create a folder and upload an image via the Resource Browser, then the image appears in the directory structure of the other site. So of course the image never loads when browsing to the page since the image isn’t where it is expected. If I manually copy the image using the shell into the appropriate place of the correct site, then the image does load on the page.
I am accessing the manager via the url:
http://firstsite.org/manager/
FYI, I did have some odd problems where I initially had my first site setup where I accessed it via:
http://fristsite.org/modx/
I decided I’d rather hide the modx directory, but after modifying my httpd.conf file to the above, when I browsed to the site, none of the images of the sample site loaded. Just the text with a white background. So I ran the install again to resinstall the site(I dropped the database first and let the isntall create it).
Apache/2.2.3 (Ubuntu, Feisty Fawn) PHP/5.2.1
MySQL 5.0.38
MODx:
Using modx-0.9.6.1
Just installed, haven’t added anything.
Browser/Client:
Firefox 2.0.0.11
WinXP SP2