wojciech's picture

Hello everyone!

on the beggining i would like to thank you guys for the great appliance you've developed! its marvaless!

 

Actually this is the first time im starting my web server and i have no idea how to configre it.

Ive managed to configure the accounts for the mysql user and im able to login from outside via myphpadmin

 

Im not sure if I have to create a virtual server or edit the Existing virtual hosts... could someone explain in few steps how to configure the web server for my site.

I just want to put my files into a public folder (which one is it? - /var/www ?).

 

Thanks in advance

Forum: 

I can only offer very beginner help for www:

/var/www is the default web root.

Many people put folders inside to create...not virtual hosts, but separate sites.

So I may have /var/www/ampache --> http:/localhost/ampache

                        /var/www/limesurvey -->http://localhost/limesurvey

                        /var/www/elgg --> http://localhost/elgg

Another way is to configure a site in /etc/apache2/sites-available/  - use the existing files as a model. Then look up these commands for ubuntu and debian: a2ensite  and a2dissite.

The third way I know of is to add a file in /etc/apache2/conf.d/ create a file called mysite.conf and format it and tag it as apache2 expects, and you should have your virtual hosts.

Sorry to be so vague; I only have a vague understanding myself, always have to use reference sources, and always use existing files as templates. Here's one of many resources: http://www.control-escape.com/web/configuring-apache2-debian.html

All the best,

Rik

wojciech's picture

thanks for Youre support. it was handy since ive started to use this appliance.

 

Ive managed to place my 2 sites into two different folders. They are reachable when i use the following address:

http://<IP>/folder

 

now, I'd like to configure my domains, so the traffic from outside would point directly my folders, however the domain configuration only lets me to point the servers ip address, the rest (i mean the folder)should be done in .htaccess.

 

Where in the WebAdmin configuration i can configure the domains?

 

edit: generally, im looking for a WebAdmins manual guide.


wojciech's picture

okay. someone from the irc channel guided me how to solve my problem, which was very helpul, and i would like to share it if someone who meets something similar.

unfortunately the only way that im aware of it is to do it by the console.

 

For each domain create a configuration file over here: /etc/apache2/sites-available/

than edit it, and fill it with this:

  1. NameVirtualHost www.example1.com:80
  2.  
  3. <VirtualHost www.example1.com:80>
  4.         ServerAdmin webmaster@example1.com
  5.         DocumentRoot /var/www/www.example1.com/
  6. </VirtualHost>
  7.  
  8. <Directory /var/www/www.example1.com/>
  9.         Options Indexes FollowSymLinks MultiViews
  10.         Order allow,deny
  11.         allow from all
  12. </Directory>
  13.  
  14. after that, disable the default configuration file:
  15. a2dissite default
  16.  
  17. and start the new one:
  18. a2ensite example1
  19.  
  20.  
  21.  

Add new comment