apache

Name URL is re-written as IP by something? nginx, apache, django?

I am using django, nginx and apache. When I access my site with a URL (e.g., http://www.foo.com/) what appears in my browser address is the IP address with admin appended (e.g., http://123.45.67.890/admin/). When I access the site by IP, it is redirected as expected by django's urls.py (e.g., http://123.45.67.890/ -> http://123.45.67.890...

If I use an Apache v2 licensed JavaScript library in my web-application, do I have to include the copyright notice?

I have a commercial web application and just found a great JavaScript library I'd like to use. This library is licensed under Apache v2. How do I properly (and legally) use the library in my public web application? Since I like to achieve as much performance as possible in my web application, can I do the following: Can I remove the ...

How do I handle a VirtualHost/Passenger entry for a Rails site that solely handles subdomains?

I want to use Rails 3's new subdomain features to handle all subdomain paths except www and nil. Oppositely in a second rails app, I want to solely handle www and nil in the url path. What would my two VirtualHost entries look like for Apache with Passenger? And in the code, for the first subdomain handling app, so long as I handle th...

Is setlocale restricted to its script instance?

According to PHP, "locale information is maintained per process." Is my understanding correct that this is the same as saying per script instance with an Apache server? In other words, if I have several concurrent sessions using different locales, can changes in one user's locale settings interfere with another's? Also is there a conve...

nginx or apache for comet based PHP application?

I am building a PHP comet based application. Which web server should I use in the backend? Apache / nginx (this is what most forums say) or something else would be better? ...

Regular expression to allow for number values between 1-3 digits?

In my .htaccess file I have the following rule: RewriteRule ^gallery/[0-9][0-9][0-9]/$ index.php?gallery_id=$1 It allows for any number that is three digits in length. I do not know how to allow for less than three digits as well (or more than three for that matter). I am still new to regex. Thank-you! ...

Is it possible to disconnect an http client from PHP?

In PHP is it possible (and is it safe) to close the http connection without returning any http status code? My server is apache. Will this be logged to the access log or error log? ...

Form processing causing apache to crash??

I use the following code to register users on my site. The problem is that when a user registers apache doesn't respond and crashes. Is there a break in my code or something I am doing wrong???? <?php include ('../includes/db_connect.php'); $firstname = $_POST['firstname']; $email = $_POST['email']; $username = $_POST['username']...

modified .htaccess file doesn't block bad user agents with RewriteCond

Hi. I found this modified .htaccess settings for extra security, but it doesn't seem to work. Here it is : # Apache configuration file # httpd.apache.org/docs/2.2/mod/quickreference.html # Techniques in here adapted from all over, # including Kroc Camen: camendesign.com/.htaccess ServerSignature Off # you probably want www.exampl...

In Django, how do I allow print statements to work with Apache WSGI?

"print" only works in development server. But what if I want it to work in Apache? Just in case I forget to comment it out...I want to be able to go smoothly without causing errors. (Just print to nothing) ...

Can't get mod_wsgi and Apache with Django to work

This is the error I get in my Apache error log: [Sun Aug 22 16:52:06 2010] [error] [client 127.0.0.1] ImportError: No module named settings This is my .wsgi file, per this blog post: import sys sys.path.insert(0, '/home/wot/django-projects/aedo') import settings import django.core.management django.core.management.setup_environ(setti...

Superfish Hover Issue with IE6 and Apache Logs

Hi, Hoping someone can assist as well as explain the following: I am using jQuery Superfish menu on ie6 and from what I can see from the apache log files for my session, is that whenever I hover over a menu item in my Superfish menu that has sub-menus, depicted with menu item that has a white arrow head image to the right of the menu i...

How to import Apache access log into MySQL table?

What is the recommended approach to import Apache access log into a MySQL table? I am thinking of a ruby/perl script + a cron job. It'll be great if there is an example or reference. I am not sure how to handle the bookmarking of the last log entry in last import either. Suggestions are welcome. Thanks! ...

Insert data into MySql table strange exception...

Hi , I am using this code to insert some values in MySql table: <?php mysql_connect("localhost","root","root"); mysql_select_db("bib"); $id = "12"; $titlu = "Joe"; $query = "INSERT INTO carte SET id='$id', titlu='$titlu'"; $result = mysql_query($query); // Display an appropriate message if ($result) echo "<p>Product successfully in...

change default user of webserver for special directories

for example, if i'm using a php script that writes files, or using a cms , the files and folders that are generated are owned by a special user (f.e. www-data:www-data) is it possible to change this default user for special directories? so that for example all cms systems or php scripts in general use another user and group in the dir /...

Session problems when APC is turned on

We have a problem with PHP session when APC is enabled on our server. The app works great without APC. However, since we enabled APC, the sessions seems to be getting mixed up when the server experiences heavy load, i.e. users are randomly logging on as another. Everything reverts back to normal once we disabled APC. We can't seem to fi...

Apache Redirect 301 fails with parameters

Hi, i try to do 301 redirect from this address: /web/8888/nsf/sbs.py?&_ID=9884&did=3025&PF=14&G=9884&SM=9884&lang=HE&_UserReference=956357C53FD2C8024C725EE5 to this address: /?page=product&p_id=9884 the 9884 value is dynamic value the others always not I try to use: Redirect 301 "/web/8888/nsf/sbs.py?&_ID=9884&did=3025&PF=14&G=9884&S...

Showing a long running shell process with Apache

I have a CGI script which takes about 1 minute to run. Right now Apache only returns results to the browser once the process has finished. How can I make it show the output like it was run on a terminal? Here is a example which demonstrates the problem. I want to see the numbers 1 to 5 appear as they are printed. ...

How does this zend framework path work?

Hello, I'm using the zend community server on windows vista. I'm following the tutorial in the book Zend Framework 1.8 by Keith Pope. $this->_view->headLink()->appendStylesheet('/css/main.css'); is not finding the main.css file (404). The actual file path is htdocs/myapp/public/css/main.css . When i take out the slash and chang...

header('location: ..') not working

(1)I'm in the process of uploading my website to a remote web server. (2)The site's template system is set up in a way that all of the pages are formed by sending url-encoded get requests to index.php (3)Loading up the initial page works. This page determines the location of the next page by evaluating the value of its form. (4)The r...