LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache with VirtualHosts how to use (https://www.linuxquestions.org/questions/linux-server-73/apache-with-virtualhosts-how-to-use-4175441373/)

frieza 12-16-2012 03:16 PM

another (possibly overkill) solution is Interface Aliases

each with their own IP address and switching to IP based virtual hosting.For an example, I used it once to host multiple SSL based websites on the same server.

lpallard 12-30-2012 12:06 PM

Quote:

Originally Posted by custangro (Post 4850465)
I don't understand why you are using Named Virtual Hosts if you're not using DNS. It simply won't work like how you're thinking it will.

If all you want is to be able to access the site with

http://<ip address>/<site>

Then just put you sites under...

Code:

/var/www/htdocs/
              /site1
              /site2
              /site3
              /site4

The you can access it with...

http://<ip address>/site1
http://<ip address>/site2
http://<ip address>/site3
http://<ip address>/site4

--C

Something in Newznab's configuration or the way the app was written... Outside of a VH it wouldnt work... It was constantly searching for the scripts and php files under /www/ (Apache's root) whereas in real life the files were under /www/newznab/www/ (where they should be). I believe it is because whoever wrote newznab had in mind that it would be the main web application running on the webserver but in my case, its not.

With VH, all is fine now!!!!

Thanks to all who helped here!

moduleWolf 02-21-2013 05:02 PM

@lpallard

Can you post your final diffs from the files you changed? I would like to see your final solution.

lpallard 02-24-2013 08:51 PM

Of course! let me know exactly what you want to see in my config..


For now, apache's extra vhost config file:

Code:

NameVirtualHost *:80

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

<VirtualHost *:80>
        ServerName newznabplus
        <Directory /var/www/htdocs/newznabplus/www/>
                Options FollowSymLinks
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
        DocumentRoot /var/www/htdocs/newznabplus/www
</VirtualHost>

I did not change anything else.... Once this file was modified, all was fine...


All times are GMT -5. The time now is 08:03 AM.