vhosts

I'm getting 403 error using passenger for rails in apache

浪子不回头ぞ 提交于 2019-12-04 11:46:58
问题 I've already installed the needed tools, and followed several tutorials trying to make passenger respond. I can access static files in public folder (public/500.html or 422.hml). Yesterday I entered through a vhost, and found some passenger errors. But some time later the hosting restarted the service, and since then I have not been able to access the rails app again. link link link These are some of the links I used to configure the server. I've also read that could be a permission issue; I

mac 下 mamp 配置虚拟主机步骤

十年热恋 提交于 2019-12-03 18:28:10
PRO用户请华丽飘过~ 先进入apache的配置文件httpd.conf,路径是/Applications/MAMP/conf/apache/httpd.conf,用文本编辑器打开,command+f查找一下‘vhosts’关键字,来到了这一行 #Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 把前面的#号去掉,表示这句话生效,这句话的意思就是使虚拟地址的配置文件生效。 保存后,用文本编辑器打开 /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf,加入需要配置的虚拟地址,大概是这样的: 这里注意不要照着MAMP里面httpd-vhosts.conf的演示代码写,我试过那个不起作用,用下面的可以。 <VirtualHost *:80> DocumentRoot "/Applications/MAMP/htdocs/tp5/public" ServerName tp.cn ServerAlias tp.cn <Directory "/Applications/MAMP/htdocs/tp5/public"> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow

Same server, both SSL and non-SSL

半腔热情 提交于 2019-12-03 15:22:41
问题 Is it possible to have both SSL protocol and non-SSL protocol running on the same server in Apache 2.x? So if I access http://example.com (non-SSL) and https://example.com (SSL) they would both be available. If so, would I need to create a virtual host? How would this VirtualHost directive look like, could anyone give me an example? (Assuming I already have the certificates) 回答1: Yes, you simply add another VirtualHost for the same name on port 443 (HTTPS). Set SSLProtocol to whichever

Sharing one port among multiple node.js HTTP processes

China☆狼群 提交于 2019-12-03 08:58:27
问题 I have a root server running with several node.js projects on it. They are supposed to run separately in their own processes and directories. Consider this file structure: /home +-- /node +-- /someProject | www.some-project.com | +-- index.js | +-- anotherFile.img | +-- ... +-- /anotherProject | www.another-project.com | +-- /stuff | +-- index.js | +-- ... +-- /myWebsite | www.my-website.com | +-- /static | +-- index.js | +-- ... +-- ... | ... Each index.js should be started as an individual

Vagrant Share - Accessing Virtual Hosts and accessing those that are not in the default web root

主宰稳场 提交于 2019-12-03 07:02:48
I have Vagrant setup and running CentOS 6.5 x64 and it runs great. No issues running multiple sites within this one VM. All sites are running from the /var/www/public folder with the exception of PhpMyAdmin which runs from /var/www/html . I am trying to use vagrant share to gain access to any of the vhost sites that are running. The problem is that vagrant share is only displaying the contents of the /var/www/html folder. Is there something further that I need to do in order to gain access to my newly created /var/www/public folder? I have tried editing the hosts file, on another machine, to

PHP cURL doesn't see the /etc/hosts file

亡梦爱人 提交于 2019-12-03 06:11:15
I'm having troubles on making the PHP cURL library recognize the alias I created in my /etc/hosts file. This is what I have in my /etc/hosts file right now: 192.168.0.20 www.example.dev On the other side (192.168.0.20) Apache is configured to run the virtual host on the example.dev domain. The alias works if I test it on my browser but with PHP cURL just doesn't work. The hosts file is on both machines (192.168.0.10 <= PHP cli, 192.168.0.20 <= Apache) . For the sake of completeness this is the PHP code I'm using. $this->url = 'http://www.example.dev/'; $this->ch = curl_init(); $header = array

Same server, both SSL and non-SSL

不羁岁月 提交于 2019-12-03 05:00:52
Is it possible to have both SSL protocol and non-SSL protocol running on the same server in Apache 2.x? So if I access http://example.com (non-SSL) and https://example.com (SSL) they would both be available. If so, would I need to create a virtual host? How would this VirtualHost directive look like, could anyone give me an example? (Assuming I already have the certificates) Yes, you simply add another VirtualHost for the same name on port 443 (HTTPS). Set SSLProtocol to whichever protocols you wish to allow. <VirtualHost *:80> ServerName your-domain.com DocumentRoot /var/www/your-domain-root

Sharing one port among multiple node.js HTTP processes

强颜欢笑 提交于 2019-12-02 22:57:20
I have a root server running with several node.js projects on it. They are supposed to run separately in their own processes and directories. Consider this file structure: /home +-- /node +-- /someProject | www.some-project.com | +-- index.js | +-- anotherFile.img | +-- ... +-- /anotherProject | www.another-project.com | +-- /stuff | +-- index.js | +-- ... +-- /myWebsite | www.my-website.com | +-- /static | +-- index.js | +-- ... +-- ... | ... Each index.js should be started as an individual process with its cwd set to its parent-folder ( someProject , anotherProject , etc.). Think ov vHosts.

Virtual Host with MAMP

≡放荡痞女 提交于 2019-12-02 06:42:00
I installed Drupal 8 with MAMP. My MAMP preference number for Apache Port : 80 , Nginx Port: 80 and MySQL Port: 8889 In etc/hosts file, I add 127.0.0.1 mmcast.test In httpd.conf file, Listen 80 and uncomment the following line. # Virtual hosts Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf In httpd-vhosts.conf file, NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /Applications/MAMP/htdocs ServerName localhost </VirtualHost> <VirtualHost *:80> ServerName mmcast.test DocumentRoot "/Applications/MAMP/htdocs/mmcast" </VirtualHost> When I call the site, I type mmcast.test:8888

Apache vhost not working for subdomains

余生长醉 提交于 2019-12-01 10:07:19
问题 I have this configuration but both url app.test.com & stage.test.com redirect to same code/deployment <VirtualHost *:80> ServerName app.test.com DocumentRoot /var/www/html/Test-Prod/web <Directory "/var/www/html/Test-Prod/web"> Options Indexes FollowSymLinks AllowOverride All </Directory> ErrorLog logs/test-prod__error_log CustomLog logs/test-prod_access_log common </VirtualHost> <VirtualHost *:80> ServerName stage.test.com DocumentRoot /var/www/html/Test/web <Directory "/var/www/html/Test