vhosts

apache virtual host definition with regex

笑着哭i 提交于 2019-12-01 06:25:40
问题 For development projects I point real domains to localhost using hosts file. and I add virtual host definition to apache config file. My question is it possible to redirect all "xyz.com" domains to "d:/xampp/htdocs/websites/xyz.com" directory ? this way I will not need to add vhost definition everytime. 回答1: You can use a wildcard in your VirtualHost 's ServerAlias directive: <VirtualHost *:80> # Official name is example.com ServerName example.com # Any subdomain *.example.com also goes here

Laravel Homestead vhost configuration

北战南征 提交于 2019-12-01 04:04:46
I am using Laravel homestead. For a project I need a special vhost configuration, where should I define this? You add a new folder mapping into the "sites" block of Homestead.yml, like so: - map: myapp.com to: /home/vagrant/Code/myapp/public That's all there is to adding a new vhost. To modify it, edit the appropriate file in /etc/nginx/sites-available . In the above case, this would be /etc/nginx/sites-available/myapp.com See here for example customization of a newly added vhost. Note that the quick tip linked here uses Homestead Improved, a slightly enhanced version of Homestead, as

Laravel Homestead vhost configuration

拜拜、爱过 提交于 2019-12-01 02:20:51
问题 I am using Laravel homestead. For a project I need a special vhost configuration, where should I define this? 回答1: You add a new folder mapping into the "sites" block of Homestead.yml, like so: - map: myapp.com to: /home/vagrant/Code/myapp/public That's all there is to adding a new vhost. To modify it, edit the appropriate file in /etc/nginx/sites-available . In the above case, this would be /etc/nginx/sites-available/myapp.com See here for example customization of a newly added vhost. Note

Grunt server does not use virtual host name for my app..vhost and httpd are set up but grunt is not using them

只愿长相守 提交于 2019-11-30 20:54:53
So I am trying to setup my app with a name rather than using 127 0 0 1. Every single time I run grunt, my address is http://127.0.0.1:9000/#/ ... I've tried many things and nothing is working...I always get redirected to that place. Here are my files: httpd.conf <VirtualHost *:80> DocumentRoot "/Users/myusername/Sites/MyApp/app" ServerName myapp.dev <Directory "/Users/myusername/Sites/MyApp/app"> Options FollowSymLinks MultiViews Indexes AllowOverride All Order allow,deny Deny from none Allow from all </Directory> </VirtualHost> hosts 127.0.0.1 myapp.dev ::1 myapp.dev Gruntfile.js // Generated

Zend Framework 2 without Vhost configuration

只愿长相守 提交于 2019-11-30 07:37:24
I had finished my first web application using Zend Framework 2 and I'm about to put it online. But may web host doesn't allow me to change my vhost configuration! The .htaccess file is allowed. So my question is: How to set up my ZF2 app with only .htaccess files? Assuming you have a standard ZF2 application based of the skeleton, then try creating a .htaccess file in the root with this in it: RewriteEngine On RewriteRule ^\.htaccess$ - [F] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$ /public/index.php [NC,L] RewriteCond %{REQUEST_URI} !^/public/.*$ RewriteRule ^(.*)$ /public/$1 RewriteCond

Apache 500 Internal Server Error on my virtual host [closed]

心不动则不痛 提交于 2019-11-30 05:39:57
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I have my web app projects located in a folder in /media/disk1/Projects. I want to serve them using an Apache virtualhost at http://lab/ . This is how I set up my virtual host: 1. Copied /etc/apache2/sites-available/default to /etc/apache2/sites-available/lab 2. Edited /etc/apache2/sites-available

How should I organize multiple Express servers on the same system?

我们两清 提交于 2019-11-28 15:06:05
I'm using one server to host multiple Node.js web apps, which are distributed across multiple domains. My current practice is to run an Express server for each app on a different port, and to run a base server that simply routes (redirects) requests to the correct port/Express server. This works, but it means that my base server is routing every single HTTP request (and by manually redirecting it), and that my users see my apps as hosted at [hostname.com]:8000. After a bit of research, I've found that I can use http-proxy for my routing needs, but I'd still like to know if there's a best

Apache giving 403 forbidden errors

江枫思渺然 提交于 2019-11-28 06:50:44
Ok, so i've previously set up two virtual hosts and they are working cool. they both house simple web projects and work fine with http://project1 and http://project2 in the browser. Anyway, I've come to add another vhost. I edited the /etc/hosts file with 127.0.0.1 project3 and also updated the httpd-vhosts.conf file by copy and pasting the previous entries for project2 and editing the file path. I've checked all the file and folder permissions (in fact I copied and pasted from project2) and simply put a "hello world" message in the index.php file. I get a 403 forbidden permission denied

Apache Multiple Sub Domains With One IP Address

爷,独闯天下 提交于 2019-11-28 05:01:18
This has probably been asked but I can't find a straight answer, or the ones I found don't work. I have one domain mydomain.com , resolving to an IP; let's call it 8.8.8.8. The DNS settings also point two subdomains to that IP address with an A record. These are dev.mydomain.com and staging.mydomain.com . Both have an A-record pointing to 8.8.8.8. On the server (8.8.8.8) I have two virtual hosts files. These are as follows: staging.mydomain.com.conf <VirtualHost *:80> ServerName staging.mydomain.com DocumentRoot /var/www/html/mydomain.com/staging/ </VirtualHost> And... dev.mydomain.com.conf

How to redirect to a different domain using NGINX?

混江龙づ霸主 提交于 2019-11-28 03:17:01
How can I redirect mydomain.com and any subdomain *.mydomain.com to www.adifferentdomain.com using NGINX? server_name supports suffix matches using .mydomain.com syntax: server { server_name .mydomain.com; rewrite ^ http://www.adifferentdomain.com$request_uri? permanent; } or on any version 0.9.1 or higher: server { server_name .mydomain.com; return 301 http://www.adifferentdomain.com$request_uri; } server { server_name .mydomain.com; return 301 http://www.adifferentdomain.com$request_uri; } http://wiki.nginx.org/HttpRewriteModule#return and http://wiki.nginx.org/Pitfalls#Taxing_Rewrites Why