Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In my server i have to different domains running successfully.
Now I want to define a new subdomain under one of theses domains.
Running apache2ctl –S in order to see Virtual host defined, we get:
apache2: Could not reliably determine the server's fully qualified domain name, using 10.70.220.1 for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:443 www.domain1.org (/etc/apache2/sites-enabled/000-default:59)
*:80 is a NameVirtualHost
default server www.domain1.org (/etc/apache2/sites-enabled/000-default:2)
port 80 namevhost www.domain1.org (/etc/apache2/sites-enabled/000-default:2)
port 80 namevhost subx.domain1.org (/etc/apache2/sites-enabled/000-default:48)
port 80 namevhost www.domain2.org (/etc/apache2/sites-enabled/000-default:54)
Syntax OK
It looks like virtual host are ok. When I try to browse to domain1.org or domain2.org everything is ok. The problem is when I try to brose to subdomain subx.domain1.org. This subdomain is not working properly.
I´m sure something is missing but I don’t know what.
Server version: Apache/2.2.3
Server built: Sep 8 2008 09:03:05
Thanks
Detailed Virtual Host Definitions
=================================
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.domain1.org
DocumentRoot /var/www/
<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>
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
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>
It looks like virtual host are ok. When I try to browse to domain1.org or domain2.org everything is ok. The problem is when I try to brose to subdomain subx.domain1.org. This subdomain is not working properly.
Please define what you mean by "is not working properly".
Apache config looks good, so it could be a dns issue, but without further details it's difficult to guess
Please define what you mean by "is not working properly".
Apache config looks good, so it could be a dns issue, but without further details it's difficult to guess
Regards
The error is in any browser: Page Not Found or IE cant show the page.
So you say that you visit http://subx.domain.org, you get a 404 error and you get nothing logged!
Are you sure you're visiting the right vhost? What gives
So you say that you visit http://subx.domain.org, you get a 404 error and you get nothing logged!
Are you sure you're visiting the right vhost? What gives
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.