apache

Apache RewriteRule and Skipping Logic

I've pretty much hit a wall here. As far as I can tell, this should work, but it doesn't. I have a local development address with a wildcard subdomain of *.localhost, and friendly URLs of /[0-9]/somestring. What I am trying to do is have username.localhost/1/page to localhost?pageId=1&username=username. The complication comes in tryi...

htaccess / apache automatically mapping to php files?

I'm working with htaccess in a php application. I want some behavior like this: Send request to mydomain.com/login Have htaccess intercept the request to login and send to index.php?ref=login However I have that all set up and for some reason it automatically sends the mydomain.com/login request directly to login.php without going t...

Apache: %25 in url (400 Bad Request)

I have a url containing the following: /somepath/morestuff/ohno%25foobar For some reason apache is reporting a 400 bad request (it has something to do with the %25). I am using mod_rewrite to rewrite the path to point to my codeigniter instance but it's not even getting to codeigniter, it's just the default apache error. Any ideas? ...

How do I handle blocking IO in mod_wsgi/django?

I am running Django under Apache+mod_wsgi in daemon mode with the following config: WSGIDaemonProcess myserver processes=2 threads=15 My application does some IO on the backend, which could take several seconds. def my_django_view: content=... # Do some processing on backend file return HttpResponse(content) It appears tha...

Optimize PHP for Serving All Files (And Not Apache)

I have a need to send all requests for any web resource through PHP for user authentication purposes, and to not serve any files directly through Apache. Here's my .htaccess: # All requests are routed to PHP (images, css, js, everything) RewriteRule ^(.*)$ index.php?query=$1&%{QUERY_STRING} [L] I then process the request, verify the u...

htaccess trick to load resources (js/css) below the web root

I am trying to achieve something that I am not sure if htaccess can even do. What I have is a folder structure: myapp some_folder some.js www css js now the web root is pointing at www folder so i can do http://mydomain.com/js/jquery.js and it would work but what I want to do is http://mydomain.com/myapp/some_folder/some.js a...

how to use exec() to update, delete and edit username and password of .htpasswd?

Dear all exec() is new to me and i am trying to learn on how to use it to edit and update usernames and passwords of visitors, if there is a tutorial website or someone can teach me on how to use it ...

Long delays and messed up AJAX responses when running Pylons app via Apache

I have a Pylons app that I'm trying to set up using Apache and FCGI. The Pylons INI file has this in it: [server:main] use = egg:Flup#fcgi_thread host = 0.0.0.0 port = 40100 This used to work on an old CentOS server with Pylons 0.9.7, but now I'm trying to set it up on a new one, running Ubuntu 10.04 and Pylons 1.0. I can connect to t...

Consdirations for making multiple handlers in same apache module or having seperate modules for each handler

I am writing an application where there are a bunch of handlers. I am trying to see if i should package these handlers within the same apache module or have a seperate module for each handler. I agree this is a generic question and would depend on my app, but i would like to know the general considerations that i have to make and also ...

How to convert apache log time to activerecord :datetime

I'd like to save apache logs to MySQL via ActiveRecord. In the apache log, the default time string is like: [13/Aug/2008:00:50:49 -0700] How can I convert it to a ActiveRecord :datetime type? Thanks! ...

why are my php files showing as plain text?

I've been writing php apps using php for a while in wamp. Now I'm installing PHP & apache separately on my work PC. I've installed PHP 5, and the latest apache. I go to localhost and see it works! now I add a file called test.php which displays: <?php phpinfo(); ?> but in the browser it just displays plain text. Is there somewher...

Development setup advice needed - Django + Apache2 + mod_wsgi - on Mac and Ubuntu Dev Server

I need advice if this setup is ok. I have a personal dev server which runs Ubuntu. I have setup Ubuntu completely with git, django, mod_wsgi and apache2 running. I will be developing using my Macbook Pro. My idea was to have identical directory structure on both machines off of web root. Say: Mac: /path/to/webroot/ ...

setting up apache web server - noob question

hello, i am new to apache web server, i am simply trying to create a single html file website viewable to all served from my computer. I have located where the default text file is, but after using a web proxy i realized the proxy could not reach my website. this probably sounds rudimentary to you but would you know where in the httpd f...

rewrite url using htaccess

How can I change url in this way using htaccess: http://example.com/page.php?go=something.php should be redirected to: http://example.com/something If the get parameter name is different than 'go' leave as it is... ...

Apache Redirect path to subpath

i have original urls of type servedomain/index servedomain/category i just need to redirect all of these urls to servedomain/app/index, servedomain/app/category except css and images ...

Current version of "Using mod_ssl on Mac OS X" documentation?

I'm fairly new to Mac I want to enable SSL on my Mac (10.6.4) for some local development. In searching for an answer, I ran across Using mod_ssl on Mac OS X. However, this Apple developer support document looked out of date. In further searching, I ran across Configuring mod_ssl on Mac OS Snow Leopard which basically asked the same qu...

Trying to use .htaccess rules to redirect to load FR content w/ a FR domain and EN content w/ an EN Domain

I'm using MediaWiki with mulitlingual subpages. When I go to "english.com/Page_title" I want to load just that (which is the default) When I go to "french.com/Page_title" I want to load the /fr subpage, which is "french.com/Page_title/fr" and here's my current rules: RewriteBase / RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|css|js...

Can you configure Apache to work on multiple developer workstations?

I am on a Mac running Snow Leopard which includes Apache. I want to run a local copy of Apache for web development. To do this so far I have had to set my full path for the document root and the rest of the paths for things like ErrorLog and PidFile. What I would like to do is create an httpd.conf which work across multiple developer wo...

Iconv.conv in Rails application to convert from unicode to ASCII//translit

We wanted to convert a unicode string in Slovak language into plain ASCII (without accents/carons) That is to do: č->c š->s á->a é->e etc. We tried: cstr = Iconv.conv('us-ascii//translit', 'utf-8', a_unicode_string) It was working on one system (Mac) and was not working on the other (Ubuntu) where it was giving '?' for accented chara...

issues on download Apache Tomcat

I am trying to install Apache Tomcat, but I find to different files: one is CORE while another is Deployer which one should I choose? ...