I bought a VPS Host that gave me only 1 IP Address which I used on my first domain name and it works without any problems.  Now my second domain name I can't use the same ip address as it points to the first domain name.  So I figured my only option was to use a GoDaddy hosted iframe redirection which redirects to a sub folder on my first domain which worked so far.  Now I'm trying to load paypal from &lt;?php headers() ?&gt; and I get a permission error because of that iframe  Refused to display 'https://www.paypal.com/cgi-bin/webscr?notify_url=&amp;cmd=_cart&amp;upload=1&amp;business=removed&amp;address_override=1' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.   How do I avoid the Iframe solution for my second domain while not messing up my first domain?  Somebody I forgot once told me it doesn't matter if you have 1 IP Address you could host multiple websites on it? how it that possible the DNS doesn't seem to work off ports afaik, yes I could host multiple websites on different folders but that's not what I call hosting a real website it has to be pointed by a domain name, so this iframe issue doesn't happen  My server configuration is httpd (apache) that comes with CentOS 6 (Linux) operating system
12815
I have a VPS that I've installed a Apache Web Server on. What I want to do is forward my own website domains to that server and host those websites' files inside my Apache Web Server. As far as I understand a DNS server is required to manage which domain is hosted where (IP-wise). But what I want to do is host my websites under the same IP address, the one that my web server has. How can I separate those websites' files inside my web server so I don't have to use http://host/foo for www.foo.com and http://host/bar for www.bar.com?
106845
I have an two wordpress sites that I would like to host on the same domain. One is already up and running, the other is sitting in waiting.  Can I get the second as a subdomain, or simple within a folder, to run on the same domain (different DB) without converting to multisite?
26973
I'm not quite clear on the difference between ServerName and ServerAlias. It looks like both of them work as host name settings, except that ServerAlias only works within the &lt;VirtualHost&gt; tag.  That is, I can do:  ServerName www.domain1.com ServerName www.domain2.com   or:  &lt;VirtualHost *:80&gt; ServerName www.domain1.com ServerName www.domain2.com &lt;/VirtualHost&gt;   and both domains work on the same box. Can I use either ServerName or ServerAlias in this case?
70626
So I have my own windows server, and on it I am using Multicraft to host multiple Minecraft servers. I have also purchased a domain through google. I have a subdomain set up for each Minecraft server instance on different ports, as well as a subdomain for the Multicraft webserver. All domains work fine, but my issue is I only want multicraft.example.com to direct to the webserver, however all other subdomains when put into a web browser instead of Minecraft also direct to the Multicraft panel. I've looked at  but it does not answer my issue. I have the pointers already working with A records and SRV records for the webserver and Minecraft server. But because they're on the same IP, every subdomain for a Minecraft server points to the webserver. I only want the webserver domain to point to the webserver. Not the Minecraft subdomains.
108169
I have a local DNS server that resolves all URLs *.domain.tld to 127.0.0.1. Also, I have the production server with the same address *.domain.tld. They have the same names, because subdomains interact with each other, and I have hardcoded domain URLs. I can't change them in the production server.  The problem is to reach the production server from my developer computer without touching the DNS server and /etc/hosts.  I found some options for Chrome such as --dns-server, --host-rules, but none is working. I have Google Chrome 23.0.1271.64 and Chromium 22.0.1229.94 on Ubuntu 12.10 64-bit.
69843
I have two domains: staging.abc.com and www.example.com pointing to the same server IP in my DNS. I don't have a site enabled/available for staging.abc.com, but I have one for www.example.com. However, whenever I access staging.abc.com, it points to www.example.com.  Here are my confs. My /etc/nginx/nginx.conf is default. I didn't change anything.  I don't have a sites-available/default. It's been removed.  # sites-available/example server {   listen 80;   server_name example.com;   return 301 http://www.example.com$request_uri; }  server {   listen 80;   listen [::]:80;    root /home/deployer/example;   index index.php index.html index.htm;    server_name www.example.com;    location ~* .(jpg|jpeg|png|gif|ico|css|js|woff)$ {   expires 30d;   }    location / {     try_files $uri $uri/ /index.php?q=$uri&amp;$args;   }    error_page 404 /404.html;    error_page 500 502 503 504 /50x.html;   location = /50x.html {     root /usr/share/nginx/html;   }    location ~ \.php$ {     try_files $uri =404;     fastcgi_split_path_info ^(.+\.php)(/.+)$;     fastcgi_pass unix:/var/run/php5-fpm.sock;     fastcgi_index index.php;     include fastcgi_params;     fastcgi_read_timeout 300;   }    include /home/deployer/example/nginx.conf; }   # nginx.conf user www-data; worker_processes 4; pid /run/nginx.pid;  events {         worker_connections 768;         # multi_accept on; }  http {          ##         # Basic Settings         ##         charset utf-8;         sendfile on;         tcp_nopush on;         tcp_nodelay on;         keepalive_timeout 65;         types_hash_max_size 2048;         # server_tokens off;         proxy_read_timeout 300;          # server_names_hash_bucket_size 64;         # server_name_in_redirect off;          include /etc/nginx/mime.types;         default_type application/octet-stream; ...   I tried inserting this to the http block but to no avail:  server {     listen      80;     server_name "";     return      444; }   Here's what I want to achieve:   Changes are preferably done on sites-available. The server should not resolve any connection (returns 444) for all domain names that have not been assigned to any app.
42111
Recently I registered for a domain name and bought it. I had failed to check their hosting plans first :(. They charge a lot for hosting a website. I am thinking of hosting it under some free web hosting provider. How do I host my website with another web hosting provider which is not the provider I registered the domain with?
122026
I just purchased a domain on Dreamhost, let's say foo.com. I already have hosting, let's say at 123.4.56.789, and have setup a directory foo.com which is accessible at 123.4.56.789/foo.com/. I can set the DNS to point foo.com to that IP, but how do I route it to that folder once it's there? My hosting has a really bad cPanel that gives me almost no help. Can I use .htaccess, or something else? What's the best way to accomplish this?  Edit in response to comment(s): It's VPS hosting, so I have access to http.conf and other system files. Also, yes it's Apache.
93225
At the moment I have example.com that my colleague bought from GoDaddy which was first purchased via Google Work. The purchase did not include a hosting plan. We do not plan to host our website on GoDaddy since we have a less expensive option using another host.  We still want to keep the Google Work services, and the domain in GoDaddy. However, we are trying to point the address to the new hosting. I have minimal understanding of DNS &amp; its records, so please correct me if I am wrong.  At the moment the A record for example.com has the following records: 1. 50.xx.xx.xx 2. 216.239.32-38.21 which is from Google.  These are the following actions that I have taken to address this: 1. Add the hosting's IP to the A record 2. Edit CNAME record for www to example.com (it was previously @)  Now, the changes do not seem to do anything, when I try to access example.com it still redirects to Google's 404 page (the same as before the changes). I realize DNS changes may take up to 12-48 hours, but since I am not 100% confident in what I am doing I might as well ask the community if this is correct.  Question: 1. Am I doing this right? What additional steps do I need to do? Is it okay to keep those Google A records? Do I need to remove anything? 2. Is @ the same thing as example.com?
61455
I create landing pages in order to launch PPC campaigns for my customers. However, I would like to host them all together under a sub-domain of MY website.   For example:  I want that someone who visits www.clientnumber2.com/landingpage could see the landing page and still the same URL www.clientnumber2.com/landingpage, but actually host it myself.  The same for client3, client4, and so on...
90310
When I register a new domain, I send it to my hosting provider by assigning it its domain name servers in the registar's settings. For example, with Digital Ocean, I input the following:  ns1.digitalocean.com ns2.digitalocean.com ns3.digitalocean.com   I then add the domain settings in the A record of my server. It just occurred to me that anyone else on the same hosting provider can add an A record with a domain I own.   Is there anything preventing this from occurring? if 2 different servers that use the same domain name server try to assign a domain to themselves through the A records, where would the domain actually resolve when you enter it in the browser? what prevents domain name collisions on the same DNS server?
93969
I need to host several Apache virtual hosts with SSL from a single IP.  Now - I understand that because SSL wraps around the HTTP request, there's no way to know which host is being requested until a public key has been sent to the client first. This essentially breaks the possibility of SSL virtual hosts using a standard SSL certificate.  I have obtained a Unified Communications Certificate (UCC), otherwise known as a Subject Alternative Name (SAN) certificate. This allows me to serve the same certificate for multiple domains.  I would like this to be the certificate served by Apache for any SSL request - and then have Apache resolve the virtual host as usual, once the encryption has been established.  How should I configure Apache for this? I have tried to research how this can be done, but all I can find are quotes which say that it is possible, but no specifics:    wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI     While Apache can renegotiate the SSL   connection later after seeing the   hostname in the request (and does),   that's too late to pick the right   server certificate to use to match the   request hostname during the initial   handshake, resulting in browser   warnings/errors about certificates   having the wrong hostname in them.   serverfault.com/questions/48334/apache-virtual-hosts-with-ssl     Incidentally, it is possible to have   multiple SSL-secured named virtual   hosts on a single IP address - I do it   on my website - but it produces all   sorts of warnings in the Apache logs,   and certificate warnings in the   browser. I certainly wouldn't   recommend it for a production site   that needs to look clean.   -David Jul 31 at 4:58   www.digicert.com/subject-alternative-name.htm     Virtual Host Multiple SSL sites on a single   IP address. Hosting multiple   SSL-enabled sites on a single server   typically requires a unique IP address   per site, but a certificate with   Subject Alternative Names can solve   this problem. Microsoft IIS 6 and   Apache are both able to Virtual Host   HTTPS sites using Unified   Communications SSL, also known as SAN   certificates.     Please help.
5392
When using the ssh or ftp commands from the Bash shell, does the server that I am connecting to learn of the domain name used? I understand that the domain name is locally translated into an IP address via DNS. In HTTP, after that happens, the server is told the original domain name as well in order to serve the correct page, or to present the correct TLS cert (SNI).  host serverfault.com GET /   Does a similar phenomenon happen when connecting to ssh or ftp?  I ask because I am  trying to ssh into a server (GoDaddy webhosting) which expects a domain name, but is not letting me in when I try to connect via user@IPaddress as the DNS is not yet moved to the GoDaddy IP address.
91784
I am pretty new to development and this is why I am stuck at such a "beginners" problem.  I want to have a directory under /var/www/mysite with a index.html and access it via web browser on my PC (Win10 64 Bit) by typing mysite.example into it.  I don't want to publish anything into the internet with that. I only want to test and develop a site which later might be hosted.  I have created a VirtualMachine using Oracle VirtualBox and installed Ubuntu16.04 (64-Bit, also enabled Virtualization at my i5 2500 in Bios so I get these 64-Bit displayed).  Then I installed apache2, mysql and php.  ip addr show gave me an address: 192.168.178.31.   So if I type into my browser http://192.168.178.31/ I get to the apache2 default page - It works!  I created the directory /var/www/mysite and put a simple index.html for testing purpouse into it. I said sudo chown -R 775 to /var/www/.  Now I need to create a vhost so I can access to this index.html in this specific directory by typing in a specific string into my browser. But it just won't work!  I went to /etc/apache2/sites-available/ and created mysite.conf.  This is the content:  &lt;VirtualHost *80&gt; ServerAdmin webmaster@localhost DocumentRoot /var/www/mysite ServerAlias mysite.example &lt;/VirtualHost&gt;   I did a2ensite mysite.conf, sudo service apache2 reload and restart  So there I am. If I type mysite.example into my browser I only get errors.  Site not reached. DNS-Server for mysite.example not found and so on (ERR_NAME_NOT_RESOLVED).
66283
My code doesn't work with second level tld's like domain.co.uk Here is my conf:   # add www.   if ($host ~ ^(?!www)) {    rewrite ^/(.*)$ http://www.$host/$1 permanent;   }    # remove subdomain   if ($host ~ &quot;^www\.(.*)\.(.*\.([a-z]{2,4}|[a-z]{2}\.[a-z]{2}))&quot;) {    set $host_without_sub $2;    rewrite ^/(.*)$ http://www.$host_without_sub/$1 permanent;   }
27562
It's the following part of a virtual host config that I need further clarification on:  &lt;VirtualHost *:80&gt;   # Admin email, Server Name (domain name), and any aliases   ServerAdmin example@example.com   ServerName  141.29.495.999   ServerAlias example.com ...   This is and example config, similar to what I currently have (I don't have a domain name at the moment).  &lt;VirtualHost *:80&gt; - Allow the following settings for all HTTP requests made on port 80 to IPs that this server can be contacted on. For instance, if the server could be accessed on more than one IP, you could restrict this directive to just one instead of both.  ServerName - If the host part of the HTTP request matches this name, then allow the request. Normally this would be a domain name that maps to an IP, but in this case the HTTP request host must match this IP.  ServerAlias - Alternate names accepted by the server.  The confusing part for me is, in the above scenario, if I set ServerAlias mytestname.com and then made an HTTP request to mytestname.com, there would have to be a DNS record pointing to the server's IP for this to work? In which case, is ServerAlias just basically EXTRA ServerName entries?  Say I had a DNS entry such that foobar.com = 141.29.495.999 but then I had ServerName = 141.29.495.999 and ServerAlias was empty, would that mean that although foobar.com gets resolved to the right IP, because there is no reference to accept foobar.com in ServerName or ServerAlias?  Or something. Man I'm confused.
119168
I am running into a weird problem trying to disable HTTPS for one domain, but the other domain has HTTPS. They both are different websites running on a dedicated server, sharing the same IP address for the domains.  However, I have a domain that does not have a SSL certificate, but the other does. I want to disable HTTPS for the non-certified domain while leaving the other domain with HTTPS on.  I have two different separate vhosts in /etc/nginx/sites-enabled/,   domain1.org (no HTTPS)  server {      listen                      80;     server_name                 www.domain1.org domain1.org;     root                        /var/www/domain1.org;     index                       index.html index.php index.htm;      error_log                   /var/www/logs/domain1.errors.log;      [ ... ]   domain2.com (with HTTPS)  server {      listen                      443 ssl;     server_name                 domain2.com www.domain2.com;      # INCLUDE SSL CERTIFICATE     include                     sites-enabled/domain2_ssl_include;       root                        /home/domain2/www/www;     index                       index.html index.php index.htm;      [ ... ]   I've included a listener to the port 443 for domain1.org, but once I do that, I get an aborted error from Firefox saying (when accessing ):     This Connection is Untrusted      You have asked Firefox to connect securely to domain1.org, but we can't confirm that your connection is secure.   I opened the technical data, it appears that the domain1.org is using the domain2.com SSL certificate:     domain1.org uses an invalid security certificate.      The certificate is only valid for the following names:    *.domain2.com , domain2.com        (Error code: ssl_error_bad_cert_domain)   So I added this to domain1.org vhost configuration:  server {      server_name                 domain1.org www.domain1.org;      listen                      443 ssl;      rewrite ^ http://domain1.org permanent; }   Which still gets me prompted with the Firefox error.  Now... when I access to , I get an 400 error from nginx saying this:     400 Bad Request      The plain HTTP request was sent to HTTPS port   I am not entirely sure what to do, disabling the https with ssl off; has no effect. How can I actually disable HTTPS for domain1.org but not for domain2.com?  I am using Ubuntu 12.04 running nginx 1.2.6.