how to remove "/home/username/public_html" from url ?

Hi, here is what is working:

I dumped a magento website from a fully functionnal url: www.mydomain.com/store
to my ubuntu 12.04 lamp server using virtualmin.
my server get a static ip .
I created a cname from my host console as: test2.myhost.com = my static ip
I created a new virtual server which is test2.myhost.com

from my browser, i can type http://test2.myhost.com and it returns the content of my public_html
Great !!

What’s the problem than ?

when i try http://test2.myhost.com/store which should correspond to my magento website
it returns some error 404 files not found , especialy css and js files
for example:
http://test2.myhost.com/home/username/public_html/store/js/prototype/validation.js

and it should return:
http://test2.myhost.com/store/js/prototype/validation.js

This seems to come from the document root variable or one of the php globals, isnt it ?

so here is my question ?

How can i hide this part from the url : /home/username/public_html

Thanx for your help

Howdy,

Magento is known to work on Virtualmin systems; what you’re seeing definitely sounds unusual!

It’s possible that something broke in the process of moving it from one system to another; a lot of apps don’t like having things changed, especially if the path it’s in changed.

You may want to verify in your config that the various Magento paths are set correctly for your current server. This here is a good starting place:

http://www.magentocommerce.com/wiki/recover/restore_base_url_settings

Your suggestion pushed me on the way !!

In fact the base urls where set up correctly but…

when seeking once again the settings my eyes stood open on the merging features for css and js files into magento.
I finaly found this treat that gave me the correct answer:
http://stackoverflow.com/questions/2141873/why-is-magento-1-4-including-javascript-files-by-filesystem-path

from my magento admin even if i was sure to disable the merging process, the button to save the changes was not operating because of the js files missing.
So i went to phpmyadmin through the table core_config_data (that’s why you put me on the way) and I changed the values according to this post:

Editing the config.xml didn’t do the trick for me, I had to disable it in the database.

In table ‘core_config_data’ set the value of the row with path ‘dev/js/merge_files’ (config_id 772) to ‘0’.

Thanks for pointing me in the right direction though!

I changed the value to “0” for “dev/css/merge_css_files” aswell

Thank you very much for your help !

Fred