Hi all,
I am new to this and have installed Ubuntu Server 7.10 i386 edition. I am trying to create subdomains to be accessible by other computers on the network.
I have the following setup:
- PC with Ubuntu Server 7.10 i386 installed
- Laptops, both Windows and Mac's
I can:
- From the laptops access the server through http://192.168.2.200 and it directs me to my index.htm that i setup.
I want to:
- From the laptops access subdomains on the server, http://diamonds.192.168.2.200 ??? If this is fundamentally wrong, what alternative do I have to produce something of similar results? When i attempt to access http://diamonds.192.168.2.200 I get "Server not found" message
I don't want to:
- Have subfolders, EG. http://192.168.2.200/diamonds, http://192.168.200/pearls etc
What I have tried:
- http://thinkingnectar.com/2008/getti...-in-localhost/
- http://ubuntuforums.org/showthread.p...able+subdomain
What is all this for?
- I am trying to make a few websites that will be accessed through subdomains, eg http://diamonds.domainname.com and http://pearls.domainname.com, however, i don't yet have a domain name registered. I intend on purchasing this AFTER i get my websites up and running.
What am I doing wrong guys? A pointer in the right direction and any help will be greatly appreciated.
My current settings:
Directory: /etc/apache2/sites-available$
Files: default websites
default
Code:
NameVirtualHost *
<VirtualHost *>
ServerAdmin webhost@gmail.com
DocumentRoot /var/www/domain.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
"/usr/lib/cgi-bin">
DocumentAllowOverride None
<DirectoOptions +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Options FollowSymLinks
AllowOverride None
</Directory>
ErrorLog /var/log/apache2/error.lognks MultiViews
AllowOverride None
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.rom all
LogLevel warns directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
CustomLog /var/log/apache2/access.log combined
ServerSignature On
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
DenyOverride None
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost> AllowOverride None
# in /apache2-default/, but still have / go to the right place
websites
Code:
# localhost
<VirtualHost 127.0.0.1>
DocumentRoot /var/www/domain.com/
</VirtualHost>
# pearls
<VirtualHost 127.0.0.2>
DocumentRoot /var/www/pearls/
</VirtualHost>
# diamonds
<VirtualHost 127.0.0.3>
DocumentRoot /var/www/diamonds/
</VirtualHost>
directory: /etc/apache2/sites-enabled$
files: 000-default domain.com pearls diamonds
domain.com
Code:
NameVirtualHost *
<VirtualHost *>
ServerAdmin webhost@gmail.com
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/domain.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
pearls
Code:
<VirtualHost *>
DocumentRoot /var/www/pearls/
ServerName pearls.localhost
<Directory /var/www/pearls/>
Options Indexes FollowSymLinks MultiViews +Includes
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
diamonds
Code:
<VirtualHost *>
DocumentRoot /var/www/diamonds/
ServerName diamonds.localhost
<Directory /var/www/diamonds/>
Options Indexes FollowSymLinks MultiViews +Includes
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
directory: /etc/apache2$
httpd.conf
Code:
<VirtualHost *>
ServerName localhost
DocumentRoot /var/www/domain.com
</VirtualHost>
<VirtualHost *>
ServerName pearls.localhost
DocumentRoot /var/www/pearls/
</VirtualHost>
<VirtualHost *>
ServerName diamonds.localhost
DocumentRoot /var/www/diamonds/
</VirtualHost>
Directory: /var/www$
Folders: apache2-default diamonds domain.com pearls
Thanks in advance,
David
Bookmarks