rockindano30 Posted July 15, 2008 Share Posted July 15, 2008 hello all, well i have a webserver that i'm working on. now for all my websites i used apache/php/mysql. my question is how do i host three or multiple website in my server using apache as a server with php/mysql? no i have to set it up in the config file for apache if so how would i go about that? Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted July 15, 2008 Share Posted July 15, 2008 go to the site that you registered your domain at and change the nameservers(dns) to your server's nameserver. Then you should be able to change a setting in your domain where you can "add domain" and in there, you'd specifiy the domain, and then create an ftp user, and then it'd create a folder in your main directory with where that new website's files would be located Quote Link to comment Share on other sites More sharing options...
rockindano30 Posted July 15, 2008 Author Share Posted July 15, 2008 oh so i dont have to add another dir. to the httpd.config file for apache. it all goes with whoever i registered my domain name? Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted July 15, 2008 Share Posted July 15, 2008 I don't use apache. And i've never had problems adding a new domain to my server.(then again, i use shared hosting, so that may be different) Quote Link to comment Share on other sites More sharing options...
rockindano30 Posted July 15, 2008 Author Share Posted July 15, 2008 i c thanks for the hand. Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted July 15, 2008 Share Posted July 15, 2008 are you using shared hosting? Quote Link to comment Share on other sites More sharing options...
rockindano30 Posted July 15, 2008 Author Share Posted July 15, 2008 no, i purchased my server to run my site and other clients' sites. Quote Link to comment Share on other sites More sharing options...
trq Posted July 15, 2008 Share Posted July 15, 2008 You will need to look at apache vhost configuration. Its quite simple but the location of where to put your vhosts can be different depending on how apache has been setup. For me, I have a seperate file for each vhost contained within /etc/apache/vhosts, then I have the following line.... Include /etc/apache/vhosts/*.conf in my /etc/apache/httpd.conf file. From there each site has its own config, eg; /etc/apache/vhosts/foo.conf <VirtualHost *> ServerName foo.com ServerAlias www.foo.com DocumentRoot /var/www/foo <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/foo> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/foo-error.log LogLevel warn CustomLog /var/log/apache2/foo-access.log combined </VirtualHost> Quote Link to comment Share on other sites More sharing options...
rockindano30 Posted July 15, 2008 Author Share Posted July 15, 2008 thats what i was looking for. so for every vhost i have a separate file and include that line in every file? Quote Link to comment Share on other sites More sharing options...
rockindano30 Posted July 15, 2008 Author Share Posted July 15, 2008 oh i get it. thank you thorpe Quote Link to comment Share on other sites More sharing options...
trq Posted July 15, 2008 Share Posted July 15, 2008 No, the method Ive described is just one way to setup vhosts. You could place your <VirtualHost> definitions all within your main httpd.conf file if you wanted to. What distro are you using? Its likely there is a specific setup methodology already in place. Quote Link to comment 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.