Ask Your Question
0

Two domains pointing to one server with askbot

asked 2012-07-31 05:42:08 -0500

Toms gravatar image Toms
661 19 6 34

updated 2012-08-02 09:05:57 -0500

Evgeny gravatar image Evgeny flag of Chile
11059 50 84 182
http://askbot.org/

Strange behaviour on my apache server.

I've configured my apache server and Askbot installation for one domain, mysite.com.

Servername is also for this domain.

ServerName mysite.com

If I point mysite.com to IP of the server with Askbot, I see the domain:

mysite.com/questions

If I point an other domain, mysite2.com, to the same server IP, I get

mysite2.com/questions

What could be wrong? ServerName is mysite.com, so it should not be possible to see mysite2.com/questions

Full Virtual host:

 WSGISocketPrefix /home/mysitedjango/FolderForWSGISocketPrefix
 WSGIPythonEggs /home/mysitedjango/FolderForWSGIPythonEggs
 WSGIPythonHome /usr

<VirtualHost IP:80>
     ServerAdmin mysite@mysite.com
     DocumentRoot /home/mysitedjango
     ServerName mysite.com

Alias /m/ /home/mysitedjango/askbot/skins/

     Alias /static /home/mysitedjango/static
     Alias /upfiles /home/mysitedjango/askbot/upfiles
     <DirectoryMatch /home/mysitedjango/askbot/skins/([^/]+)/media>
        Order deny,allow
        Allow from all
     </DirectoryMatch>
     <Directory /home/mysitedjango/askbot/upfiles>
   Order deny,allow
        Allow from all
     </Directory>

     WSGIDaemonProcess askbot2
     WSGIProcessGroup askbot2
     WSGIScriptAlias / /home/mysitedjango/django.wsgi

     CustomLog /var/log/apache2/askbot_mysite/access_log common
     ErrorLog /var/log/apache2/askbot_mysite/error_log
     LogLevel debug
</VirtualHost>
delete close flag offensive retag edit

Comments

1

Do you have another virtualhost for port 80?

bgenevaux ( 2012-07-31 06:20:08 -0500 )edit

Marked offtopic, maybe for possible future cleanup.

Evgeny ( 2012-08-02 09:05:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-07-31 08:26:29 -0500

todofixthis gravatar image todofixthis flag of Chile
1082 16 18 37
http://www.fiveyearsabroa...

updated 2012-07-31 14:49:39 -0500

If you only specify one virtual host, then Apache will use it for every request. Try creating a second one with ServerName mysite2.com and ServerAlias * (make sure you put it AFTER the mysite.com virtual host block).

link publish delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-07-31 05:42:08 -0500

Seen: 67 times

Last updated: Jul 31 '12