vhosts

Fallback - redirect to a new domain using apache vhost configuration

半世苍凉 提交于 2019-12-11 15:23:58
问题 This is a followup question on https://stackoverflow.com/posts/47547418 I wanted my requests from somedomain.com/loadproduct?product=dell-inspiron-15 to be selectively redirected to someotherdomain.com/dell-inspiron-15 but at the same time I want to make sure if something goes wrong with the new domain, users are still able to use old domain by adding /old in the url. For example if users uses somedomain.com/old/loadproduct?product=dell-inspiron-15 then they should not be redirected to

SSL: can't load CA certificate file /etc/pki/tls/certs/ca-bundle.crt

爷,独闯天下 提交于 2019-12-11 13:40:10
问题 On my local dev machine (osx), I'm using jboss to server web services on 8443. When I hit the urls directly I get the json responses I'm looking for. The architecture we have at work includes a middle layer (apache/php) that does authentication and routing. If things authenticate then it forwards the request to the backend. When I was working with apache on port 80 and jboss on 8081 (using http). Everything worked fine for me. Now that I'm trying to use 8443, things aren't working. I recently

How to automate MAMP Pro virtual host creation through a command-line shell script?

放肆的年华 提交于 2019-12-11 11:51:53
问题 I'm writing a script to create virtual hosts in Mamp Pro. I want them to be created and appear in the GUI next to the normal ones I've created manually through the GUI. I've found the following questions on SO: Automatic Virtual Hosts with MAMP Pro? Add MAMP Pro Vhosts with script Here are my findings, so far: I've found out that the hosts appearing in the MAMP Pro GUI are found in: ~/Library/Application\ Support/appsolute/MAMP\ PRO/settings3.plist ; I've tried editing it but I can't seem to

Laravel 5.2 Pretty URLs

时光毁灭记忆、已成空白 提交于 2019-12-10 23:01:51
问题 How can i change http://domain.com/public/index.php to http://domain.com and can get the other routes working other than ('/') ? Workaround 1: vhost file: <VirtualHost *:80> DocumentRoot "/var/www/html/domain/public" ServerName domain.com <Directory "/var/www/html/domain/public"> AllowOverride All Allow from All </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> htaccess file: <IfModule mod_rewrite.c> <IfModule mod_negotiation.c>

Removal of the /var/www/icons alias from Apache config [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 17:40:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have a directory called /var/www/icons on my web server, which is also referenced as an alias in my Apache config as seen below: Alias /icons/ "/var/www/icons/" The directory contains a number of small PNGs and GIFs, which AFAIK are unused, along with a README file. Am I safe to remove this alias from my

how to run multiple projects on Apache using Virtual Hosts?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 10:50:45
问题 My vhosts are: # for localhost to work properly <VirtualHost *:1983> ServerAdmin admin@localhost DocumentRoot "d:/wamp/www" ServerName localhost </VirtualHost> # - See more at: http://yogeshchaugule.com/blog/2014/how-setup-virtual-hosts-wamp#sthash.zVhOHBlJ.dpuf # - @: http://www.techrepublic.com/blog/smb-technologist/create-virtual-hosts-in-a-wamp-server/ # - @: http://www.kristengrote.com/blog/articles/how-to-set-up-virtual-hosts-using-wamp (maybe out of usable scope) # afm : Agile Farm

Dynamic apache log directory based on hostname

可紊 提交于 2019-12-08 08:10:42
问题 I have a PHP application which is used by multiple domains. To avoid maintaining multiple vhosts, I have just setup a single "default" Apache vhost to direct any incoming request to the server to the application directory. What I want to do is to set the Apache access and error log paths dynamically based on the hostname hitting the server. For example, I would like to set the log paths to be something like: /var/log/application_name/example.com/error.log /var/log/application_name/example.com

Bulk 301 redirect from htaccess

耗尽温柔 提交于 2019-12-08 06:27:26
I have spreadsheet which has column of 404 error link and its respective 301 redirects. for e.g) 404 error page 301 redirect http://www.abc.com/1.php http://www.abc/com/2.php .............. ............ The spreadsheet has around 1000+ links. Is there any way in apache config or htaccess where can I handle bulk 301 redirects? The best way for a Bulk setting is the RewriteMap directive in mod-rewrite. Note that this will not work in a .htaccess file. You'll need to edit it in a real apache configuration file (and the good news is that will be really faster than a .htaccess dynamic configuration

Make zend framework 2 work without Virtual Host

末鹿安然 提交于 2019-12-08 03:46:29
问题 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. My .htaccess file in Public folder is like this: RewriteEngine On # The following rule tells Apache that if the requested filename # exists, simply serve it. RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] #

run external programs on virtual server

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 02:39:25
问题 I want to install small programs accessible through the command line (of linux OS) to a server and run them with PHP. I want to install Apache, vhost on my machine... Is there a way to run these external applications on my virtual server, on my system, so i can experiment with PHP calls? 回答1: We do exactly this all the time. I call them voodoo pages. Here's some working code: <?php $command="uptime"; $output; $retval; $errors=""; exec ( $command , &$output, &$retval ); echo $output[0]."\n";