Jump to content

Creare subdomeniu


alex

Recommended Posts

Pasul 1

 

Configuram urmatoarele fisiere:

# nano /etc/bind/zones/db.slashlinux.info

 

db.slashlinux.info

$TTL 86400$ORIGIN info.slashlinux	  IN	  SOA	 ns1.slashlinux.info. root.slashlinux.info.(						   2010021700	  ; Serial						   10800		   ; Refresh						   3600			; Retry						   3600000		 ; Expire						   86400   )	   ; Minimum		IN	  NS			  ns1.slashlinux.info.		IN	  MX	  10	  mail.slashlinux.info.		IN	  MX	  20	  slashlinux.info.		IN	  A			   192.168.1.1 # ip ul vostru static/public$ORIGIN slashlinux.info.www			 IN	  A	   192.168.1.1mail			IN	  A	   192.168.1.1ns1			 IN	  A	   192.168.1.1root			IN	  A	   192.168.1.1--------------------------------------------subdomeniu	  IN	A	192.168.1.1--------------------------------------------	

 

# nano /etc/apache2/httpd.conf

 

httpd.conf

NameVirtualHost *:80<VirtualHost *:80>		ServerAdmin webmaster@localhost		ServerName www.slashlinux.info		ServerAlias slashlinux.info		DocumentRoot /home/http-docs/slashlinux		<Directory />				Options FollowSymLinks				AllowOverride None		</Directory>		<Directory /home/http-docs/slashlinux				Options Indexes FollowSymLinks MultiViews				AllowOverride None				Order allow,deny				allow from all		</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	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><VirtualHost *:80>		ServerAdmin webmaster@localhost		ServerName www.slashlinux-test.info		ServerAlias slashlinux-test.info		DocumentRoot /home/http-docs/test</VirtualHost>-------------------------------------------------	 <VirtualHost *:80>		ServerAdmin webmaster@localhost		ServerName subdomeniu.slashlinux.info		ServerAlias subdomeniu.slashlinux.info		DocumentRoot /home/http-docs/subdomeniu	  </VirtualHost>-------------------------------------------------

 

# rndc reload# /etc/init.d/bind9 restart# /etc/init.d/apache2 restart

 

 

Pasul 2

Testam subdomeniul

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...