vhosts

How to enable Virtual Host on Xampp for Laravel?

ε祈祈猫儿з 提交于 2019-11-28 00:52:18
问题 I have XAMPP running on Windows 7 Pro. I am trying to setup a Virtual Host so that when I use "dev.app" as a domain I get directly to my public folder of laravel installation. Laravel is located at F:/xampp/htdocs/dev/public I opened the httpd-vhosts.conf file located at F:\xamp\apache\conf\extra\https-vhosts.conf and replaced everything with this # Virtual Hosts # # Required modules: mod_log_config # If you want to maintain multiple domains/hostnames on your # machine you can setup

How to set document root to be a subdirectory using .htaccess and not VHost

笑着哭i 提交于 2019-11-27 22:30:54
On my local machine the following works perfect: <VirtualHost *:80> ##ServerAdmin postmaster@dummy-host2.localhost DocumentRoot "C:/xampp/htdocs/website_1" ServerName testpage.com/website_1 ##ServerAlias www.recruitement.localhost ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined </VirtualHost> Howerver Im hosting my website to hosting company called justhost.com and they do not allow me to modify httpd-vhosts.conf or httpd.conf . Now my entire site is coded so that files under website_1 reference to other files under website_1 using

Move .htaccess content into vhost, for performance

佐手、 提交于 2019-11-27 15:55:24
问题 I was wondering if performance can be increased if I move .htaccess file content into a vhost file of apache2? This is the content of my .htaccess Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_NAME} ^([^.]+\.[^.]+)$ [NC] RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to

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

痞子三分冷 提交于 2019-11-27 08:59:56
问题 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

How to redirect to a different domain using NGINX?

寵の児 提交于 2019-11-27 05:06:15
问题 How can I redirect mydomain.com and any subdomain *.mydomain.com to www.adifferentdomain.com using NGINX? 回答1: 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; } 回答2: server { server_name .mydomain.com; return 301 http://www.adifferentdomain.com

How to prevent PHP sessions being shared between different apache vhosts?

左心房为你撑大大i 提交于 2019-11-27 02:06:49
How to prevent PHP sessions from being shared between different Apache vhosts? I've set up different vhosts on an Apache 2.2 and everything works perfectly, until I realized that the PHP sessions are shared by default. Edit is also the reason why you ALWAYS should set your session_save_path ( http://php.net/manual/en/function.session-save-path.php ) or use database session handling ( http://php.net/manual/en/class.sessionhandler.php ) if you are on an shared webhosting. Somebody can create an session id on there site and chmod it to 777 and use that session id on your site to bypass logins/or

How to use vhosts alongside node-http-proxy?

删除回忆录丶 提交于 2019-11-27 01:37:00
I'm running Nodejs and Apache alongside each other. node-http-proxy is listening on port 80 and then forwarding requests to either Apache(:9000) or to Express(:8000). My virtual hosts on Apache look like: <VirtualHost 127.0.0.1> DocumentRoot "/localhost/myVhost" ServerName myVhost </VirtualHost> My question is, what is the "correct" way to have vhost like functionality on the Express/Nodejs side? I would prefer to not have to place each Nodejs app on its own port as is suggested here: https://github.com/nodejitsu/node-http-proxy (Section titled "Proxy requests using a 'Hostname Only'

Apache giving 403 forbidden errors

风格不统一 提交于 2019-11-27 01:22:37
问题 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

Apache Multiple Sub Domains With One IP Address

我怕爱的太早我们不能终老 提交于 2019-11-27 00:45:04
问题 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

How to set document root to be a subdirectory using .htaccess and not VHost

[亡魂溺海] 提交于 2019-11-26 23:10:35
问题 On my local machine the following works perfect: <VirtualHost *:80> ##ServerAdmin postmaster@dummy-host2.localhost DocumentRoot "C:/xampp/htdocs/website_1" ServerName testpage.com/website_1 ##ServerAlias www.recruitement.localhost ##ErrorLog "logs/dummy-host2.localhost-error.log" ##CustomLog "logs/dummy-host2.localhost-access.log" combined </VirtualHost> Howerver Im hosting my website to hosting company called justhost.com and they do not allow me to modify httpd-vhosts.conf or httpd.conf .