virtualhost

Apache HTTPD: How to setup Virtual Host correctly

夙愿已清 提交于 2021-02-11 18:23:55
问题 I've installed Apache httpd on my Mac and "It works". Now I need to configure a Virtual Host in order to expose my application (Java Spring) with httpd as reverse proxy in front of it. This is what I have into /usr/local/etc/httpd/extra/httpd-vhosts.conf file <VirtualHost *:443> ServerName my.domain.it:443 SSLEngine on SSLCertificateFile /path/to/cert.crt SSLCertificateKeyFile /path/to/cert.key ProxyPreserveHost On ProxyPass / http://localhost:8080/myapp ProxyPassReverse / http://localhost

Nginx: How to match ONLY the main domain with server_name

こ雲淡風輕ζ 提交于 2021-02-10 16:55:46
问题 My goal is to redirect example.com into www.example.com without redirecting any subdomain to www . This is what I have: server { listen 443; server_name example.com; return 301 https://www.$server_name$request_uri; } With this configuration every subdomain (ex: foo.example.com ) gets redirected into www.example.com , not just the main one without subdomain ( example.com ), as I would like. I tried cleaning cache (and also doing it from other browsers) with same results. Edit: The proof that

Apache virtual host on different ports doesn't work

試著忘記壹切 提交于 2021-02-10 14:36:18
问题 I'm trying to serve different folders on my localhost. I'm using Windows OS. I want to serve E:/Programming/Projects on localhost:8080 , and E:/htdocs on localhost:80 My httpd-vhosts.conf file is like that: Listen 8080 <VirtualHost *:8080> ServerName localhost DocumentRoot "E:/Programming/Projects" <Directory "E:/Programming/Projects"> AllowOverride All </Directory> </VirtualHost> When I attempt to navigate localhost:80, this port works well. But localhost:8080 gives this error: 403 -

Ubuntu Apache2 local virtual hosts url not found

别来无恙 提交于 2021-02-08 04:01:51
问题 I am setting up my laptop for single-user development of multiple sites using the LAMP stack on Ubuntu 16.10 with virtual hosts for the different sites, and name-based virtual hosts. I have tried various combinations of config settings, but I cannot load a site from the Browser, I get "the requested URL was not found on this server." Here are relevant code snippets from relevant config files: Ports.conf: Listen 8000 apache2.conf: NameVirtualHost *:8000 ServerName localhost ... .../sites

Ubuntu Apache2 local virtual hosts url not found

给你一囗甜甜゛ 提交于 2021-02-08 04:01:16
问题 I am setting up my laptop for single-user development of multiple sites using the LAMP stack on Ubuntu 16.10 with virtual hosts for the different sites, and name-based virtual hosts. I have tried various combinations of config settings, but I cannot load a site from the Browser, I get "the requested URL was not found on this server." Here are relevant code snippets from relevant config files: Ports.conf: Listen 8000 apache2.conf: NameVirtualHost *:8000 ServerName localhost ... .../sites

Ubuntu Apache2 local virtual hosts url not found

隐身守侯 提交于 2021-02-08 04:01:09
问题 I am setting up my laptop for single-user development of multiple sites using the LAMP stack on Ubuntu 16.10 with virtual hosts for the different sites, and name-based virtual hosts. I have tried various combinations of config settings, but I cannot load a site from the Browser, I get "the requested URL was not found on this server." Here are relevant code snippets from relevant config files: Ports.conf: Listen 8000 apache2.conf: NameVirtualHost *:8000 ServerName localhost ... .../sites

How to access localhost (wamp) from another computer or device

我的梦境 提交于 2021-01-29 03:44:23
问题 I need to acces a project in wamp from, another pc and an android device. I tried looking it up in the internet nothing worked so far 回答1: Update your httpd.conf or httpd-vhosts.conf file in the <Document> tags. mod_authz_core was introduced in Apache 2.3 and changed the way that access control is declared. So, for example, instead of the 2.2 way of configuring <Directory> ... <Directory "C:/wamp"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>

How to access localhost (wamp) from another computer or device

可紊 提交于 2021-01-29 03:42:46
问题 I need to acces a project in wamp from, another pc and an android device. I tried looking it up in the internet nothing worked so far 回答1: Update your httpd.conf or httpd-vhosts.conf file in the <Document> tags. mod_authz_core was introduced in Apache 2.3 and changed the way that access control is declared. So, for example, instead of the 2.2 way of configuring <Directory> ... <Directory "C:/wamp"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>

Can we include files in the server.xml file of a tomcat to configure virtual host

偶尔善良 提交于 2021-01-28 07:03:34
问题 I have the following section of the server.xml file in my tomcat. <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> </Host> <Host name="mydomain1" appBase="d1" unpackWARs="true" autoDeploy="true"> <Alias>xyz-mydomain1.com</Alias> <Alias>abc.mydomain1.com</Alias> <Valve className="org.apache.catalina.valves

Apache CORS headers for docker

南楼画角 提交于 2021-01-28 05:32:31
问题 On my server I have two docker containers. One is docker Registry, and the other is Angular app that access first containers endpoint. Docker registry has mapped port 5000 and is proxied through Apache's virtual host to domain docker.mydomain.com. Angular app has port 5002 and is proxied to dockerhub.mydomain.com I set up a virtual host file for my docker registry like this: <VirtualHost *:80> ServerName docker.mydomain.com Redirect permanent / https://docker.mydomain.com/ </VirtualHost>