|
[SMS] - Superb Mini Server Project Support Forum |
 |
|
 |
View previous topic :: View next topic |
Author |
Message |
vadim Member
Joined: 16 Oct 2008 Posts: 40
|
Posted: Tue Jun 22, 2010 2:15 pm Post subject: Virtual hosting on SMS |
|
|
Hello,
For your reference, i provide you with the helping hand how to add virtual hosting to SMS server.
Step 1.
Set up files of your server at this point
/path-to-hosts/virtualhosts/mysite.com (for instance)
Step 2.
edit the following file:
File /etc/httpd/extra/http-vhosts.conf
Example is given below:
First section (Defult) is obligate to find correctly SMS hosting
-------------------------------------------------------------------------------------
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost _default_:80>
ServerAdmin mail@mysite.com
ServerName sms.com
ServerAlias www.sms.com
DocumentRoot /srv/httpd/htdocs
<Directory /srv/httpd/htdocs>
Options Indexes FollowSymLinks
ServerSignature Off
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 192.168.0.
Allow from .localnet
</Directory>
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log common
</VirtualHost>
########### Site mysite.com
<VirtualHost *:80>
ServerAdmin mail@mysite.com
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /path-to-hosts/virtualhosts/mysite.com
<Directory /path-to-hosts/virtualhosts/mysite.com>
Options FollowSymLinks -Indexes
ServerSignature Off
AllowOverride Limit
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log common
</VirtualHost>
-------------------------------------------------------------------------------------
AllowOverride Limit - parametr is chosen in order to use files htaccess
Step 3.
Edit below file:
File /etc/httpd/httpd.conf
1.
Make usable the file below:
# Virtual hosts
Include /etc/httpd/extra/httpd-vhosts.conf
2. Redact or change default parametres for root directory
-------------------------------------------------------------------------------------
<Directory "/srv/httpd/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
order deny,allow
deny from all
allow from 192.168.0.
</Directory>
-------------------------------------------------------------------------------------
Pay attention to "allow from 192.168.0." that limits only from local net! it is very important from the safe point of view!
Step 4.
It would be safer if you download a password on MySQL and make a special user for MySQL server with less number of privileges. However please remember that you should edit cfg files at other web services if the password is changed.
We use sms server inside the local net under firewall. For entrance to sms server from internet we open only port No.80. This configuration seems for us safe, nevertheless we would be grateful to any suggestion from your side regarding this issue. |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Tue Jun 22, 2010 3:36 pm Post subject: |
|
|
thank you for taking the time to post this helpful guide. I will try it out and let you know how it works for me
thanks again |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
 |
 |
SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional
|
 |
|
|