Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter radelcas

    (@radelcas)

    You are absolutely right. I actually created a separate folder for the blog out of the htdocs folder. For mydomain.com virtual server, I only specified it once, and on the next VirtualHost I only did the ServerAlias without the ServerName and I pointed each one to its own container. The part that was really screwing me up, was in the wordpress options part – it has two urls one for the wordpress and one for the blog – if you use virtual server and do not have that right, I could not get back to it to change it so I had to start over each time. I don’t know why I struggled with that so much since all the other virtual server stuff I got working. Do you know where in the config files you can change that with editor if you mess up? Anyway, I think I got this working. Not on the internet with it yet, but I am learning …. Thanks so much for your help.

    Thread Starter radelcas

    (@radelcas)

    Ok, thanks – here is what I did and what is currently happening:

    NameVirtualHost my-local-ip-address:80
    Listen my-local-ip-address:80

    <VirtualHost my-local-ip-address:80>
    ServerName mydomain.com
    ServerAlias myblog.mydomain.com
    DocumentRoot /absolute/path/to/htdocs/
    </VirtualHost>

    <VirtualHost my-local-ip-address:80>
    ServerName mydomain.com
    ServerAlias http://www.mydomain.com
    DocumentRoot htdocs/www
    </VirtualHost>

    <VirtualHost my-local-ip-address:80>
    ServerName test.com
    ServerAlias http://www.test.com
    DocumentRoot htdocs/test
    </VirtualHost>

    And, local host has all domains pointing to the local ip, and works accross network ok. Not yet on internet just using host files no internal dns for this.

    What is happing now though, is that:
    myblog.mydomain.com Works and brings up blog which is in the blog folder in htdocs; and all the other domains work, but myblog.mydomain.com/test and the myblog.mydomain.com/www/ bring up the test domain and www web sites also. I don’t want that – so is the absolute path the answer for that? The reason I didn’t use it initially is because I thought I was following the httpd.conf file instructions saying that the root was set, and I didn’thave to specifiy the whole path, and since it worked for all other sites except WordPress, I thought it is a WordPress thing.

    So each url without the /foldername at the end should bring that site only, and the /foldername should not go to anything unless it is for that site url.

    Is that understandable or am I being dense?

    Thanks again.

    Thread Starter radelcas

    (@radelcas)

    Well I read all the links above. I followed the directions of the second link, plus read some of the Apache documentation. I really want to start blogging so if I can’t get all my web sites on this machine and have them co-exist with wordpress, I guess I will – but I hate giving up – so here is what I have, and what is happening:

    Basically, the Virtual Server stuff works OK, it is when I add the WordPress to the virtual section that it breaks (WordPress that is) – If I go to the options on the admin site for WordPress, and change the urls to the same as in the httpd.conf – it breaks (I tried techbytes.myweb.com/blog and without the /blog part). If I leave the Virtual Server stuff completely commented out for all Virtual Servers, then the url part works – techbytes.myweb.com ok, from the local or from another machine on network that has the right host entry for techbytes.myweb.com. At one point, I got the actual Blog site to come up, but then the admin site would not come up – I think there is some re-direction going on with the php, but being php stupid, I cannot easily understand it. Also, I just wanted to start bloggin and putting web sites up, then go back and study the php more closely. Yes, I clear the caches also when I make changes by restarting the whole XAMPP thing!

    Thanks for the help :=)

    Ubunto Linux
    XAMPP for Linux 1.5.5a
    PHP 5.2.0
    PHPMyAdmin 2.9.1
    MySQL 5.0.27
    Wordpress 2.0.5
    Apache 2

    Apache htdocs is in /opt/lampp/htdocs
    wordpress is in /opt/lampp/htdocs/blog

    Here is my httppd.conf file’s Virtual Server part:

    NameVirtualhost *:80

    <VirtualHost *:80>
    ServerName localhost
    DocumentRoot htdocs
    </VirtualHost>

    <VirtualHost *:80>
    ServerName wuz-up.com
    ServerAlias http://www.myweb.com
    DocumentRoot htdocs/myweb
    </VirtualHost>

    <VirtualHost *:80>
    ServerName myblog.com
    ServerAlias techbytes.myweb.com
    DocumentRoot htdocs/blog
    </VirtualHost>

    <VirtualHost *:80>
    ServerName test.com
    ServerAlias http://www.test.com
    DocumentRoot htdocs/test
    </VirtualHost>

    My Local Host File:
    127.0.0.1 localhost
    127.0.0.1 techbytes.myweb.com
    192.168.2.6 http://www.myweb.com
    192.168.2.6 techbytes.myweb.com
    192.168.2.6 http://www.test.com

Viewing 3 replies - 1 through 3 (of 3 total)