apache2

Subdomaining in rails 3

笑着哭i 提交于 2020-01-03 02:47:05
问题 I am working on a project which is a app store. User can subscribe to many applications. I am creating a subdomain for each user and applications he subscribed are again running on subdomains. Eg. 1). One user registers and selects subdomain as "mysubdomain". Then after logging in he will be accessing everything as "mysubdomain.appstore.com". 2). After registration he subscribes an app, say, "discussion-board". 3). Then the discussion board will be running on "discussion-board.mysubdomain

How to hide application context in its URL with Tomcat?

主宰稳场 提交于 2020-01-02 09:28:56
问题 I have a number of applications running in Tomcat. Every one has its own context. I hooked them all to different domain names with Apache HTTP Server and mod_jk (see more details at this question: How to mount context-referenced Tomcat application with mod_jk?). Works fine, but when applications generate their web pages all URLs still have their contexts: http://www.example.com/ goes to http://www.example.com:8080/my-context/ http://www.example.com:8080/my-context/ produces a web page The web

Why does apache not process multiple requests from the same browser simultaneously

丶灬走出姿态 提交于 2020-01-02 03:13:06
问题 I'm not quite sure how to phrase this question correctly, so I'll start with the scenario I encountered. I have a bit of processing in my web app that takes longer than I'd like the user to wait to have control of the page again, so I decided to have it processed by an ajax request. The problem is, even though I offloaded this request into an ajax request, it seems that apache won't process any further requests until the original processor heavy request is complete. I originally wanted to

How to give Sublime Text 3 write permission to files in web server's DocumentRoot?

丶灬走出姿态 提交于 2020-01-02 02:42:09
问题 I use Mac OS operating system for doing some local development and I don't want to change the default document root of Apache, which is /Library/WebServer/Documents/ I put my projects under that directory. But when I editing files, Sublime Text usually asks for the password when saving the changes. Without moving the projects to a less protected location, how can I let Sublime Text access those folders and files with full permission? What about changing the owner group to something and adding

Gitlab6.0 and Apache2

孤者浪人 提交于 2020-01-01 18:58:35
问题 please how to set Github 6.0 with Apache2? Gitlab is installed according to the original instructions Adjustment in Unicorn.rb ... #listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64 #listen "127.0.0.1:8080", :tcp_nopush => true listen "127.0.0.1:8080" ... My Apache2 conf is : <VirtualHost *:80> ServerName git.domain.com ErrorLog /var/log/apache2/gitlab_error.log CustomLog /var/log/apache2/gitlab_access.log combined ProxyRequests Off ProxyPreserveHost On ProxyPass / http:/

Rewriterule for CodeIgniter not working

主宰稳场 提交于 2020-01-01 10:48:11
问题 I have installed a clean Apache2 (plus PHP & MySQL) server and enabled the mod_rewrite in the apache config. I added the .htaccess file to remove the index.php from the url as described in the CodeIgniter wiki. RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] I placed this file in the website's root. When I try to access the url mydomain.local/index.php/welcome then I get the default page of CodeIgniter. But when I try to access the same

Using apache config and htaccess to dynamically set config vars for dev and production

不打扰是莪最后的温柔 提交于 2020-01-01 03:03:05
问题 Short Summary I need to be able to set an environment variable in the Apache site config that defines if the site is dev, beta or production. The htaccess file in the web root will define config variables for the website (database credentials, domain, etc) based on the entry in the Apache configuration ALSO I need to use one of the variables defined in the web roots htaccess in another htaccess located in another directory. Site Configuration Apache config (dev/beta) I would like to set an

How to Simulate & Test URL rewrite rule in Apache 2, when on sharehosting RewriteLog is disabled/unallowed in .Htaccess?

我们两清 提交于 2020-01-01 01:17:13
问题 How to Simulate & Check a URL rewrite rule in Apache 2, when on sharehosting RewriteLog is disabled and or NOT allowed to be set in .Htaccess? In other words, are there any tools/simulators to test an url rewrite independantly of hosting, to check see for possibel Rewrite loops etc? Thanks! 回答1: I enjoy using http://htaccess.madewithlove.be However, things like RewriteCond %{REQUEST_FILENAME} !-f won't work, yet. 回答2: I use Mod Rewrite Generator to generate and test my RewriteRule. It takes

PHP APC Potential Cache Slam Averted for Key

房东的猫 提交于 2020-01-01 01:12:49
问题 I'm receiving this error while trying to use apc_store() . I googled it and saw that this was APC timebomb bug and saw some fixes which suggested adding apc.slam_defense = Off; to php.ini. I need to know whether this has happened because of a programming error, and if yes, how to fix it. This is the code segment: if ($data = apc_fetch("foo")) { $an_array = $data; } else { /* couple of lines */ apc_store("circles", $an_array); // This is where I get the error } This script will be called

Parse Apache2 Error logs with Grok for Logstash

北城以北 提交于 2019-12-31 14:56:13
问题 Im trying to parse my apache2 error log and im having a bit of trouble.. It doesnt seem to be matching the filter. Im pretty sure the timestamp piece is wrong, but im not sure, and i cant really find any documentation to figure it out. Also, is there a way to get what is in fields.errmsg to me @message ? Log [Wed Jun 26 22:13:22 2013] [error] [client 10.10.10.100] PHP Fatal error: Uncaught exception '\Foo\Bar' Shipper Config input { file { 'path' => '/var/log/apache2/*-error.log' 'type' =>