esport Posted March 9, 2010 Share Posted March 9, 2010 Hey guys, I'm developing an online ordering system portal with multiple accounts. Each account will access the one system so if I make any updates on the system, all accounts will receive the updates.I'm thinking to have each account as a sub domain. eg. shop1.example.com shop2.example.com Each account will be accessed by external websites. I'm not sure if this is possible or how to go about this. How do I make it so when they go to shop1.example.com it will display there website. So if there website was shop1.com and they go the ordering section, how would i make it so shop1.example.com will be aliased as shop1.com. This is so when people go on there website it seems like the ordering system is on their website account not on another website. I hope this makes sense. Any advice would be much appreciated. Thanks Daniel Quote Link to comment https://forums.phpfreaks.com/topic/194565-domain-name-aliasing/ Share on other sites More sharing options...
trq Posted March 9, 2010 Share Posted March 9, 2010 You would be much better off actually using separate virtual hosts for each site. You can simply share your application through soft links and correct usage of your include path if the application is designed well. Running multiple sites through one virtual host will not scale too well. Quote Link to comment https://forums.phpfreaks.com/topic/194565-domain-name-aliasing/#findComment-1023279 Share on other sites More sharing options...
esport Posted March 9, 2010 Author Share Posted March 9, 2010 hi thorpe, thanks for your prompt reply. I'm going to use a VPS to host the application. I'm not sure exactly what you mean or how to access the application from other accounts on the vps. However there are going to websites that don't sit on this vps. Is this not possible for these domains? Daniel Quote Link to comment https://forums.phpfreaks.com/topic/194565-domain-name-aliasing/#findComment-1023283 Share on other sites More sharing options...
trq Posted March 9, 2010 Share Posted March 9, 2010 Your application should be designed in such a way that it sits in a common area. You then setup a virtualhost within Apache for site. I have done this myself with a CMS that is currently hosting over 900 sites. Maintaining them all within one Apache virtualhost became a nightmare at around 200 sites and they where all split off. This should (in hind site) have been done in the first place (I didn't build the application, just maintain the server configs) and that is what I would advise you to do. Quote Link to comment https://forums.phpfreaks.com/topic/194565-domain-name-aliasing/#findComment-1023298 Share on other sites More sharing options...
esport Posted March 9, 2010 Author Share Posted March 9, 2010 Thats what I was planning to do. I was hoping to have the application in a central point which each account will access the application. However each account to appear as if they are on there own server rather than appearing on the central point in which they access the application from. Im still a little confused how to go about this. Quote Link to comment https://forums.phpfreaks.com/topic/194565-domain-name-aliasing/#findComment-1023315 Share on other sites More sharing options...
trq Posted March 9, 2010 Share Posted March 9, 2010 Its not too difficult. At its simplest you would simply setup a new virtualhost for each site. eg; <VirtualHost *:80> ServerName serverA.com DocumentRoot /var/www/sites/serverA/htdocs </VirtualHost> <VirtualHost *:80> ServerName serverB.com DocumentRoot /var/www/sites/serverB/htdocs </VirtualHost> <VirtualHost *:80> ServerName serverC.com DocumentRoot /var/www/sites/serverC/htdocs </VirtualHost> Of course there are more options available within a virtual host, but you get the idea. Quote Link to comment https://forums.phpfreaks.com/topic/194565-domain-name-aliasing/#findComment-1023417 Share on other sites More sharing options...
esport Posted March 9, 2010 Author Share Posted March 9, 2010 thanks for your help thorpe. I will give it a go and get back to you. I have no experience in web services so its all new to me. I am a web developer and have been programing in PHP for many years. I did a little bit of research and i am assuming these lines go in the file httpd.conf. Now I'm using a hosting company to host my sites, so i will need to get in contact with them to get me access to this file. Thanks Daniel Quote Link to comment https://forums.phpfreaks.com/topic/194565-domain-name-aliasing/#findComment-1023483 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.