15946

Can't get to subsites. Wildcard-subdomains probably misconfigured in Apache

Question:

I'm building a portal for the organization I'm working at.

The portal is a Wordpress site using Wampserver 2.5, intalled on a Win server 2008 R2.

It's working fine and accesible from other machines over the intranet, thanks to the helpful and patient RiggsFolly.

But now, I have changed it into a network of sites so that I can build sub-portals for the different departments in my organization.

During that change Wordpress gave this warning message: Warning! Wildcard DNS may not be configured correctly!

Wordpress has a page explaining how to configure wildcard subdomains on Apache - <a href="http://codex.wordpress.org/Configuring_Wildcard_Subdomains" rel="nofollow">http://codex.wordpress.org/Configuring_Wildcard_Subdomains</a>.

I tried following it but the explanation lacks details and I'm probably doing something wrong.

On the machine where the servers and site are installed, when I write http://hipo (hipo is the current site name) in the browser's address bar, I get to the site fine.

But when I write http://depa.hipo (depa is a subsite I created successfully), the address changes into http://www.depa.hipo/ and the browser says it didn't find a server at that address.

I have probably set the ServerAlias line wrong in httpd-vhosts.conf, and also I didn't add the line *.example.com A 192.0.43.10, or in my case *.hipo A <rightIP>, cause I wasn't sure where to add it in the file.

This is my httpd-vhosts.conf file. Your help is appreciated!

<VirtualHost *:80> DocumentRoot "c:/wamp/www/hipo" ServerName hipo <Directory "c:/wamp/www/hipo"> AllowOverride All Require all granted </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "c:/wamp/www/hipo" ServerName subsites.hipo ServerAlias *.hipo <Directory "c:/wamp/www/hipo"> AllowOverride All Require all granted </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "c:/wamp/www" ServerName localhost ServerAlias localhost <Directory "c:/wamp/www"> AllowOverride All Require all granted </Directory> </VirtualHost>

Answer1:

This definition does not have a ServerAlias so try adding one like this:

<VirtualHost *:80> DocumentRoot "c:/wamp/www/hipo" ServerName hipo ServerAlias www.hipo <Directory "c:/wamp/www/hipo"> AllowOverride All Require all granted </Directory> </VirtualHost>

Recommend

  • Installing Silverlight 4 app with sllauncher does not work
  • MySql how to compare this years month to last years month?
  • SQL statement, subquery count?
  • How to create and populate a nested ViewModel well
  • how to keep many to many relationships in sync with nhibernate?
  • Java EE: Proxy cannot be cast to Local Interface, maybe classloading issue?
  • How to get the right image data in base64 format using HTML5 canvas
  • How to Get Maven Project Version From Java Method as Like at Pom
  • How can I find the installation directory of a specific program?
  • Deploying a sample Spring Web MVC project
  • Restore session after restart in JBoss
  • What is an Artifact?
  • How to modify search result page given by Solr?
  • MySQL wildcard replace
  • How java deals with references to a generic type
  • Objective-C : getting error on console while trying to display app on ipad device?
  • Weighted round robin dns between 2 Cloudfront distributions
  • Checking whether the server is on/off
  • DNS Lookup failed - Error with all browsers [closed]
  • Cordova Apache wrong module path
  • How do you keep a running instance for Google App Engine
  • ASPNetCore MVC Routing Let Server Handle Specific Route
  • Generic classes with Collection getter of other types
  • “mvn clean generate-source” could not resolve dependencies
  • Prevent Tomcat from caching request during starup
  • How to programatically 'login' a user based on 'remember me' cookie when using j
  • Multicolored edittext hint
  • Redux Form - Not able to type anything in input
  • How solve “Qt: Untested Windows version 10.0 detected!”
  • C: Incompatible pointer type initializing
  • How can I sort a a table with VBA with given text condition?
  • NHibernate Validation Localization with S#arp Architecture
  • All Classes Conforming to Protocol Inherit Default Implementation
  • How can I send an e-mail from a vbs script
  • Accessing IRQ description array within a module and displaying action names
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Transpose CSV data with awk (pivot transformation)
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • Getting Messege Twice Using IMvxMessenger