Ubuntu Servers :: Apache Virtual Hosts Behind NAT?

Aug 18, 2010

I'm wondering if this is even possible before I start the learning curve with Ubuntu and apache virtual hosts.

I have a static external IP address that resolves to the various domain names I will be using. I have a web server inside my network with a private IP address and any http request to the firewall is forwarded to the webserver on the appropriate port. This setup works well when using the same web page/configuration for all of the domains.

Will it be possible to use named virtual hosts in this configuration, or will the NAT'ing interfere?

View 9 Replies


ADVERTISEMENT

Ubuntu Servers :: Apache 2.2 Users And Groups In Virtual Hosts?

Mar 3, 2011

I have Apache up and running and have a few virtual sites enabled. All these sites belong to the same user and group and the directory root for each site is in /home/{same-user}/www/{site-name}/htdocs/

I use Samba to connect from Windows to these directories and by default, files and directories are saved as the {same-user} and {same-group}. My question is, would it cause a problem if I changed the user and group in the virtual server directives in /etc/apache2/sites-available/site.conf files, giving apache permission to write to these files and directories. In the past I have changed the user and group to www-data (the default) but this seems inefficient an cumbersome compared to what I intend to do.

I use the server mostly for development, although at times I have a small site or two available to the public. Before I do this I want to be sure I'm not leaving a gaping security hole by changing these things. If this is all wrong, what is the standard way of running virtual hosts from apache and what is the standard document root for virtual sites?

View 4 Replies View Related

Ubuntu Servers :: Correct Permission Handling Apache Virtual Hosts In Home Folder?

May 2, 2010

i use virtual hosts to develop several web applications. These are located in my home folder under /home/user/projects/project After a fresh installation, i always get a 403 forbidden error. After googling and reading on this forum, several solutions are mentioned for this problem. But i can hardly believe putting using a chmod 755 on my home folder is a correct solution. What is the correct way of doing things in this situation?

View 5 Replies View Related

Ubuntu Servers :: Apache2: SNI & Virtual Hosts - Multiple Virtual Hosts With Ssl And Only 1 Ip Address

Jan 17, 2011

[Code]....

What I want: multiple virtual hosts with ssl and only 1 ip address: In my example: server = 192.168.227.129

[Code]....

View 9 Replies View Related

Server :: Apache Virtual Host To Limit The Concurrent Connections Of Virtual Hosts?

Jul 3, 2009

apache virtual host to limit the concurrent connections of virtual hosts? Taking into account the host of each virtual user's home directory can also have more than one subdirectory, which should be restricted to a subdirectory. Is beyond the control of the operation of these sites in a subdirectory. Best local restrictions or limitations to the overall situation.

View 1 Replies View Related

Server :: Apache Virtual Hosts - Ubuntu Desktop?

Jul 15, 2011

I have just setup two Apache virtual hosts and I was wondering how I could link them to different domains so that they could be accessed from another machine.

View 7 Replies View Related

Server :: Apache Virtual Hosts With IP Address?

Jul 2, 2010

What is the (officially) proper way to configure Apache so that a given IP address can have two or more virtual host names, each going to different distinct configurations (e.g. with different DocumentRoot, Alias, etc), and also do this for the IP address so that it goes to a designated configuration rather than defaulting to the first or a random host name?

Apache documentation does not appear to address this. If so, it has it hidden in a non-obvious place.

View 7 Replies View Related

Server :: SSL Certificates And Virtual Hosts On Apache

Jan 9, 2011

I run couple of sites on a virtual hosting environment and I am in need of adding additional SSL for a different domain name. From what I read on some forum topics indicate that SSL cert requires different IP address. meaning one cert for each IP. Is this true? If so, then I'm having some difficulties understanding the benefits of running virtual host if a server can't host multiple secured site through single IP. Any way to run multiple ssl site within virtual host environment. I'm hoping for a possible workaround.

View 3 Replies View Related

Slackware :: How To Configure Apache Virtual Hosts

Jun 27, 2011

I am trying to configure Apache to handle virtual hosts. For this I un-commented the line in httpd.conf that say

Include /etc/httpd/extra/httpd-vhosts.conf
Then I included the following in httpd-vhosts.conf:
<VirtualHost *:80>
<Directory /var/www/git.localhost/gitorious/public>
Options FollowSymLinks
AllowOverride None
Order allow, deny
Allow from All .....

View 6 Replies View Related

Debian Configuration :: Apache Virtual Hosts And Ssl - Not Yet Supported

Mar 4, 2010

I'm having trouble implementing SSL on a AvantFax login screen. I've created the the certificates and keys and have them stored in /etc/apache2/ssl and I'm sort of stuck now. I've been following a guide but any changes to the conf files leads to errors. The system I'm using is Debian 5.0

[Code]...

View 2 Replies View Related

Server :: Apache 2.2 Virtual Hosts - Defaulting To Main?

Jul 19, 2011

First of all I've looked at "similar threads" without finding an answer. I'm setting up Name-based VH using an IP as the base. The OS is CentOS 5.4

My config looks like:

NameVirtualHost 12.345.678.90:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.

[Code]...

The names are of course not in DNS so to access the server from my local Windows machine I had to use the hosts file: 12.345.678.90 dev1 Entering dev1 in my browser *does* take me to the server but it takes me to default VH (DocumentRoot /var/www/html). What am I overlooking?

View 14 Replies View Related

Server :: Edit Apache Virtual Hosts Successfully - But Can't Add A New One?

Oct 28, 2010

This really has me baffled! I'm running Apache 2.2 on Windows Server 2003 (I know, my first blunder). I can edit existing virtual hosts without a problem, for example, I can change this existing vhost to point to a different document root and it works fine:

<VirtualHost *:80>
ServerName existingsubdomain.mydomain.net
DocumentRoot "C:/Inetpub/wwwroot/mydirectory"
</VirtualHost>

But the moment I try to add a new virtual host, it doesn't get recognized! When I try to browse to it in a browser, I get a "Server not found: Firefox can't find the server at newsubdomain.mellemallc.net."

<VirtualHost *:80>
ServerName newsubdomain.mydomain.net
DocumentRoot "C:/Inetpub/wwwroot/mydirectory"
</VirtualHost>

Can anyone point me in the right direction as to why this may be happening?

View 4 Replies View Related

General :: Access Internal Network Virtual Hosts In Apache?

Mar 6, 2011

I currently have an Apache Web Server running on Ubuntu 10.4 and I use a DynDNS service to make them accessible to the outside world via a domain and/or subdomain.

My configs currently look like this:

<VirtualHost *:80>
ServerAdmin <obscured>@<obscured>.com
ServerName <subdomain>.<obscured>.com
ServerAlias <subdomain>

[Code].....

This works fine from access outside of the network and all subdomains resolve to the correct directory.

The problem I am having is with accessing a subdomain over my internal network.

I can access the Web Server using the server's IP address: http://192.168.1.123/ but this always takes me to the same virtual host and I don't know how to distinguish between different virtual hosts (different subdomains).

Ideally I would like to access the same subdomains using http://<subdomain>/ where <subdomain> is the same as the subdomain attached to the external domain name.

View 2 Replies View Related

CentOS 5 Server :: Apache Two Virtual Hosts On A Single IP Address?

Feb 22, 2011

I am trying to run two web servers (Virtual Hosts) on a single Linux Centos 5.5 box with a single IP address 192.168.0.182. I did all the pre-installation requirements such yum install mysql, yum install mysqladmin, service httpd start, service mysqld start etc etc.In /var/www/html directory, I have two folder called server1 and server2. These two folders have the necessary web server php script files and folders. I opened the browser and managed to install the script on one web server successfully. When I put the IP address 192.168.0.182 on the browser address bar, the page loads without any problem. Now I would like to be able to install the other web server script and I don't know how to?Here is my httpd configuration;

<VirtualHost *>
DocumentRoot /var/www/html/server1
ServerName development.mysite.com

[code]....

View 15 Replies View Related

Debian Configuration :: Apache Directory Alias Leaking Into Virtual Hosts

Sep 14, 2015

I don't know if this should be a followup to my prior topic [URL] ....

Each of the pieces I've installed all have an "Alias" directive in the conf file to link the directory where they live to be present on my server. For instance, DotClear lives in /usr/share/dotclear/web/ and there is a directive

Code: Select allAlias /dotclear /usr/share/dotclear/web
that directs http://myserver/dotclear to that site.

Now, I've set up VirtualHost entries for my DotClear and Owncloud with their own hostnames.

Code: Select all<VirtualHost *:443>
   ServerName          myowndotclear.com
   ServerAlias         www.myowndotclear.com
   DocumentRoot        /usr/share/dotclear/web

[Code] ....

Something similar for Owncloud.

The problem is when I go to [URL] ...., I get to my mythweb site.

This is not so good. So, for the sites that have their own hostnames, I removed the "Alias ..." directive. Of course, now I can't get to the hosts by going to the primary site which is probably fine, but I also still get my mythweb since that doesn't have it's own virtualhost entry.

This doesn't seem like correct behavior. Is there a better place to put the "Alias ..." directive so that it only works from one site and not all of them?

I am also thinking I should just link the directories into /var/www/html, but I'm not sure that's a better solution.

View 2 Replies View Related

Debian Configuration :: Both HTTP And HTTPS On Same Server? (Apache Virtual Hosts)

Oct 30, 2015

How to best manage both http and https pages on the same apache-server without conflicts. For example, if i have both 000-default.conf and 000-default-ssl.conf pointing to mydomain.com, and don't want users who visit mydomain.com without specifically type the https-prefix to be redirected to the https-page - how to handle users using browserplugins such as https-everywhere etc?

Another option would be to create a subdomain ssl.mudomain.com and have users who want to reach the ssl site to have to type ssl. I have tested several things with https everywhere enabled in my own browser, and it seems really hard to make this working the way i want, in one way or another i always end up getting redirected to the ssl-site automatically.

The reason i need this to work is because i run one site that i don't care much about SSL, that is the "official" part of that site, and i also host some things for friends and family on the SSL-part. This would not have been a problem if it wasn't that i use self-signed certificates for my ssl-site and the major user become afraid when a certificate-warning pops up in their browser and therefor leave the site.

View 2 Replies View Related

OpenSUSE Network :: Apache Virtual Hosts Broken After Deleting Log Files?

Feb 22, 2011

I run a dedicated opensuse 11.1 server with apache (2.2.10-2.9.1) installed. This box has been running for nearly 2 years hosting several low traffic websites. I must admit that I did not give lots of love/attention to the machine over that period. It ran rock solid. The different websites each have their own associated user account and are stored in their own /home/name/public_html/ folder. It was setup through Webmin. Each domain name is also linked to a unique IP (the box has multiple available IPs), however this is configured at my domain provider. All in all a very simple and straightforward setup that never let me down most of the past decade.

Recently the sites on the machine were no longer responding. This happens each other year or so since I write my logfiles to a separate partition. Was df -h and indeed, partition was full. Removed logfiles manually, and while I was at it I decided it was time to run an online update (yast2 / online update that is). Rebooted machine after yast telling me to do so. Sites are no longer working. Can no longer login to webmin. Only thing what works is the 'root' webpage (/srv/www/htdocs folder), which makes me rather clueless as the other sites are just not responding at all, not even a timeout or error message.While I know that deleting logfiles manually is quite stupid, I've done it fore and not really ended up in trouble.

Hence my questions: does this sound familiar to anyone and do you mind to give me a clue about where exactly I should start to look. It's been ages since I actually administrated apache, so I might overlook the obvious. Long story short: any tips are very welcome about what I should check first, what config files might have been changedith the update, etc ...

View 1 Replies View Related

Ubuntu Servers :: Virtual Hosts Don't Work With Any Web?

Jan 21, 2010

I don't know if I'm posting in the right box - I'm new to both Ubuntu and this forum so please bear with me. Thing is, I spent almost 2 days trying to find a web server that meets my likes. I tried like almost every well known web server, be it Apache, Lighttpd, Nginx, and Cherokee, one by one. For each I was successfully in getting PHP up and running, but was never able to configure the virtual hosts.

I'm 99.99% sure that I - for multiple times - followed correctly the online how-to's. Especially Cherokee, I did exactly the screencast (which is just 2 steps, as Cherokee has a GUI for virtual server setups). Strange enough, with each web server the virtual hosts thing never worked for me. I always received "Server not found" error. I tried with Firefox and Google Chrome. Currently I'm on an Ubuntu 9.10 (32bit) box - I reinstalled this one over the 64bit, to vain.

Don't know if it's a problem with my DNS, but I have another machine running Windows 7 with the same DHCP settings (means same DNS and IP range). Virtual hosts work fine there on an XAMPP installation.

View 9 Replies View Related

Ubuntu Servers :: Cannot Access Other Virtual Hosts

May 19, 2011

I have been searching and reconfiguring for 6 days now and have lost several clumps of hair.. PROBLEM: I want 2+ virtual hosts on my ubuntu server (1 ip) BUT - Only the first "alphabetically" listed sites-enabled shows.

[Code]...

[Code]...

View 6 Replies View Related

Fedora Servers :: Add Virtual Hosts To Xampp?

Aug 16, 2011

I'm new to fedora and linux. I'm trying to add virtual hosts to my xampp server in /etc/hosts I added :

Code:
127.0.0.1 localhost.localdomain testsite
and in /opt/lampp/etc/extra/httpd-vhosts.conf added this:
Code:
<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /opt/lampp/htdocs/testsite

[Code]...

View 9 Replies View Related

Ubuntu Servers :: Apache2 Virtual Hosts Foreign Characters?

Apr 23, 2010

when I'm trying to add a virtual host with a foreign character in the domain name. The foreign character is .

I've read earlier threads where it was said I should puny code it, which then translates to xn--nda

I then created a virtual host, as shown (replaced the real domain with exampl�:

Code:
<VirtualHost *:80>
ServerAdmin me@exampl�.com
ServerName exampl�.com

[Code]....

However, apache2 doesn't recognize this when I try to enter the domain, it just shows my 000default.

View 2 Replies View Related

Ubuntu Servers :: Multiple Virtual Hosts, Http And Https?

Sep 15, 2010

What is the best way to go about setting up multiple virtual hosts on the same box, one using http and one using https/ssl? I'd like to serve them from the same ip address if possible; I know it's possible in apache 1.3.

View 2 Replies View Related

Ubuntu Servers :: Bind9 For DNS Installed - Virtual Hosts Configurable

Jun 11, 2011

I have installed bind9 for DNS. I have also installed Apache2, PHP5, MySQL, and correctly configured these together. When I view domain1.co.uk it currently works fine as required. I would like to change it to:
* /var/www/domain1.co.uk/prod/ - becomes the root dir of domain1.co.uk
* /var/www/domain2.co.uk/prod/ - becomes the root dir of domain2.co.uk

Nevertheless, I have created a the following files; these are copies of the "default" file and correctly amended. the required destination directories are in place!
* /etc/apache2/sites-available/domain1.co.uk
* /etc/apache2/sites-available/domain2.co.uk

I then executed:
Code:
sudo ln -s domain1.co.uk ../sites-enabled/domain1.co.uk
Code:
sudo ln -s domain2.co.uk ../sites-enabled/domain2.co.uk

It is important to understand domain1.co.uk and domain2.co.uk represent 2 Existing domain names I own, and both point to my server.
domain1.co.uk currently works in /var/www
Why I would like multiple domain names on the server.

View 1 Replies View Related

Ubuntu Servers :: Unable To Configure Virtual Hosts File Properly

Jun 28, 2011

I'm having problems configuring my virtual hosts file properly The site [URL]... opens on http and https The site 10.0.1.3/myapp/ works
I am trying to redirect all traffic from [URL].... to [URL].... while maintaining access to [URL]....

[Code]....

View 2 Replies View Related

Fedora Servers :: Apache Doesn't Resolve Hosts?

Nov 2, 2009

Recently my home PC crashed and I had to re-installed it. I put a "clean" install of Fedora11, then copied my /home directory and some other stuff over from the old installation.I have a couple of PHP scripts I wrote, and one of them stopped working. It uses cURL, and when I enable error tracking I get:cURL error number:6cURL errorouldn't resolve host 'www.host.com'I started digging around and I found out Apache doesn't resolve anything at all, so it's not only a cURL problem. For example,

$ip = gethostbyname('host.com');
echo $ip; die();

returns "host.com" and not an IP address.My best guess so far is that Apache has no access to the DNS service (from command line and in browsers everything resolves). had a suspicion it's a SElinux issue and disabled it, but that didn't change anything.I found some old forum posts mentioning problems with chroot-ed Apache, but I haven't done anything to mine and in any case couldn't figure out what the problem was, or the solution, so I'm stuck.

View 7 Replies View Related

Ubuntu Servers :: Apache Multiple Hosts Defined Only One Page Is Served?

Dec 30, 2010

I have a server that host's several sites, recently I had to create a new server because the old one isn't good enough for me. Ive installed apache2 on the new server and moved all the files from one server to the other. I'm making tests in my local lan so I've edited my computer's hosts file to point to the name of each site to the local ip of the new server:

192.168.1.85 www.mypage.com
192.168.1.85 svn.mypage.com
192.168.1.85 trac.mypage.com

I have all the site definition files in /etc/apache2/sites-available I also have the used a2ensite to enable each page.

Whenever o use my browser to try and access each of the sites I always get the svn.mypage.com page and none of the others.

here is some debug info:

Code:
sudo apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:

[Code]....

View 1 Replies View Related

Ubuntu Servers :: NameVirtualHost 80 Has No Virtual Hosts Apache2 Hosting Multiple Sites Without DNS?

May 10, 2010

I have some problem in apache2 configuration. I have two websites on same IP on LAN.i.e. 192.168.1.5

[Code]...

What should I check in a few blogs I checked they said to mention in [URL]...But in this case what should I put I have two different websites or what other thing I have missed? I do not have access to DNS so that on LAN I can point site1.abc.com and abc.com to same IP 192.168.1.5 which to me seems could resolve the issue.

View 6 Replies View Related

Ubuntu Servers :: Creating Virtual Apache Servers?

May 3, 2010

I have Webmin installed on an Ubuntu server. I currently have a successful apache server running on port 80, however I want to create a virtual host on port 81. When I try I go to servers->Apache Webserver-> Create Virtual Host I change the port to 81 and the document root to /var/port81www then I click create. How ever when I goto 192.168.1.5:81 (local ip, I know I have to port forward but its not even working local) it does not work.

View 5 Replies View Related

Ubuntu Servers :: Setting Up A Virtual Host In Apache ?

Feb 22, 2011

I am trying to set up an Apache2 virtual host to test sites I make from my own computer.

I used this guide to set up my LAMP and vHost, The LAMP stack seems to be working great, but I run into some problems when I try to set up a vHost

As described in the guide I

1. made a new directory in my home folder /home/[myname]/www/test.dev to put my site in (it currently contains a simple index.html file as a test).

2. In /etc/apache2/sites-available I copied the file "default" and renamed it "test.dev"

3. I edited the content of "test.dev" to look like this:

Code:

4. I enabled the site using the command "sudo a2ensite test.dev". I then restarted apache "sudo /etc/init.d/apache2 reload".

5. I edited the hosts file: "sudo gedit /etc/hosts" to look like this:

Code:

6. I restarted apache "sudo /etc/init.d/apache2 reload".

Now if I enter "http://test.dev" in my firefox's adress bar I just get the apache2 "It works!" site. What is going wrong to cause firefox to show the "It works!" page rather then my own test site?

View 1 Replies View Related

Ubuntu Servers :: Apache Virtual Hosting On HTTPS?

Apr 11, 2011

I am trying to get name based virtual hosts all running on HTTPS (port 443) so I can run multiple sites on the one IP.

The DocumentRoot needs to be different for each host.

[URL]

However, I am unable to find where to actually enable these hosts in the configs. The apache website says to put it in httpd.conf however that file is empty on my machine.

The existing default virtual hosts are in "/etc/apache2/sites-available/default" and "default-ssl"

The main config file is /etc/apache2/apache2.conf

I am running version 2.2.16 of apache

I need to use the same .htpasswd file for all the sites.

I have configured CNAMES on my domain for all of these hosts.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved