Search Results

Search found 14546 results on 582 pages for 'mod authz host'.

Page 100/582 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • mod_rewrite regex help

    - by Bathan
    HI guys. Im using mod_rewrite to do some redirects on a web site. I want to be able to do the following mySite.com/ - Goto Home mySite.com/foo - Goto redirect.php and redirect acordingly. My redirect rule was RewriteRule (^\w*$) redirect.php?url=$1 [NC] But im oviously missing something because when I go tomySite.com/ I get sent to redirect.php I need a regex that allow lower and upper case letters, as well as underscores but it has to ignore "empty" strings so when I go to mySite.com/ the index file is displayed. Any help? Thanks!

    Read the article

  • Simple mod_rewrite rule.....?

    - by eberswine
    Hello. I have a edit page that looks at record_id's in the url.. I don't want the user to see any record id, that way they can't replace it with another and edit another record.... Anyways, my url is like: http://www.mywebsite.com/folder/folder_detail_edit.php?recordID=3980 I would like it to just display: http://www.mywebsite.com/folder/folder_detail_edit.php Is this possible regardless of the recordID???

    Read the article

  • stumped by WSGI module import errors

    - by rguha
    Hi, I'm writing a bare bones Python wsgi application and am getting stumped by module import errors. I have a .py file in the current directory which initially failed to import. By adding sys.path.insert(0, '/Users/guhar/Sites/acom') the import of the module worked. But I now try and import a module that I had installed via easy_install and it fails to import. I tried setting sys.path.insert(0, '/Library/Python/2.5/site-packages/') which contains the egg file, but to no avail. I would've thought that all packages under "/Library/Python/2.5/site-packages/" would be available to a WSGI application. Does anybody have any pointers?

    Read the article

  • django+mod_wsgi on virtualenv not working

    - by jwesonga
    I've just finished setting up a django app on virtualenv, deployment went smoothly using a fabric script, but now the .wsgi is not working, I've tried every variation on the internet but no luck. My .wsgi file is: import os import sys import django.core.handlers.wsgi # put the Django project on sys.path root_path = os.path.abspath(os.path.dirname(__file__) + '../') sys.path.insert(0, os.path.join(root_path, 'kcdf')) sys.path.insert(0, root_path) os.environ['DJANGO_SETTINGS_MODULE'] = 'kcdf.settings' application = django.core.handlers.wsgi.WSGIHandler() I keep getting the same error: [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] mod_wsgi (pid=16938): Exception occurred processing WSGI script '/home/kcdfweb/webapps/kcdf.web/releases/current/kcdf/apache/kcdf.wsgi'. [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] Traceback (most recent call last): [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 230, in __call__ [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] self.load_middleware() [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 33, in load_middleware [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] for middleware_path in settings.MIDDLEWARE_CLASSES: [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py", line 269, in __getattr__ [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] self._setup() [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 40, in _setup [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] self._wrapped = Settings(settings_module) [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 75, in __init__ [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) [Sun Apr 18 12:44:30 2010] [error] [client 41.215.123.159] ImportError: Could not import settings 'kcdf.settings' (Is it on sys.path? Does it have syntax errors?): No module named kcdf.settings my virtual environment is on /home/user/webapps/kcdfweb my app is /home/user/webapps/kcdf.web/releases/current/project_name my wsgi file home/user/webapps/kcdf.web/releases/current/project_name/apache/project_name.wsgi

    Read the article

  • Wildcard redirect for subdomains and URI

    - by user1807680
    I have a problem with create pernament (301) redirect in apache: I have 2 domains: olddomain.com with many subdomains newdomain.com and I want to do redirect like: if user enter on http://anysubdomain.olddomain.com should be redirected to http://anysubdomain.newdomain.com if user enter on http://olddomain.com/something should be redirected to http://newdomain.com/something if user enter on http://olddomain.com/different/index.html should be redirected to http://newdomain.com/different/index.html if user enter on http://example.olddomain.com/ex/index.html should be redirected to http://example.newdomain.com/ex/index.html I don't know how I should set this: <VirtualHost *:80> ServerName olddomain.com </VirtualHost> Regards

    Read the article

  • rewrite rule to switch to subfolder

    - by Midday
    I'm deploying a Wordpress blog, but I don't want to overwrite the current site yet. public_html/. <-- the current site public_html/wp/. <-- the new site How must my .htaccess look like so I can seamlessly switch from the current site to the new one so that http://domain.tld shows the new site like it would be directly in the public_html folder

    Read the article

  • Apache rewrite to add a directory to REQUEST_URI not working on localhost running wamp.

    - by Brett Pontarelli
    I'm running wamp on Vista (Apache v2.2.11) and have projects setup such that http://localhost/projectx is the base directory for projectx. Now, I want that requests for http://localhost/projectx/somepage/extra will rewrite to http://localhost/projectx/PUBLIC/somepage/extra To that end I have a file in C:\wamp\www\projectx\.htacces that is this simple: RewriteEngine On RewriteBase /projectx RewriteCond %{REQUEST_URI} !^/PUBLIC RewriteRule ^(.*)$ /PUBLIC$1 [L] I can't for the life of me figure out why this doesn't work. The error I'm getting is "The requested URL /PUBLIC was not found on this server". Thanks.

    Read the article

  • Explanation for expires header

    - by sushil bharwani
    I have a joomla application working on Apache.To improve site performace we have written a .htaccess file to root of the application with setting a far future expires header to all the static content. As desired first time the files load in fresh with 200 status code. when again click on the same link many of the files are served directly from cache. I need explanation for two things When i press f5 then a number of files load with 304 status code however i expected them to be coming directly from cache without hitting the server for a status header? When i close the browser and come back to the same page again i see the same thing happening a number of files load with 304 status code although i thought they will load directly from the browser cache? I understand that 304 also servs file from browser cache but i want to avoid the header communication between servers as my static files wont ever change. Also i want to add that my requests are over a https connection does that create any issue.

    Read the article

  • URL rewrite with ?lang= parameter

    - by agorom7
    my developer is saying that it is not possible to rewrite url form example.com/name/name/?lang=english to example.com/en/name/name/ is it possible to do or not? if yes, how should it be done? if not, what could be the reasons? we have windows based hosting from maddogdomains (godaddy)

    Read the article

  • .htaccess rewriting rule

    - by Kevin
    I have a folder within a site that is a seperate web app than the parent. Both are working fine, but when I go to the domain.com/folder/ path, I would like it to forward me to domain.com/folder/index.htm for consistency. This is the htaccess rule I was trying, but it wasn't working for me and I am not sure what I did wrong. RewriteRule ^folder/$ folder/index.htm RewriteRule ^folder$ folder/index.htm I tried these rules at the start and end of the rule list to see if anything was overriding and nothing appears to be.

    Read the article

  • Using pam_python in a script running with mod_python

    - by markys
    Hi ! I would like to develop a web interface to allow users of a Linux system to do certain tasks related to their account. I decided to write the backend of the site using Python and mod_python on Apache. To authenticate the users, I thought I could use python_pam to query the PAM service. I adapted the example bundled with the module and got this: # out is the output stream used to print debug def auth(username, password, out): def pam_conv(aut, query_list, user_data): out.write("Query list: " + str(query_list) + "\n") # List to store the responses to the different queries resp = [] for item in query_list: query, qtype = item # If PAM asks for an input, give the password if qtype == PAM.PAM_PROMPT_ECHO_ON or qtype == PAM.PAM_PROMPT_ECHO_OFF: resp.append((str(password), 0)) elif qtype == PAM.PAM_PROMPT_ERROR_MSG or qtype == PAM.PAM_PROMPT_TEXT_INFO: resp.append(('', 0)) out.write("Our response: " + str(resp) + "\n") return resp # If username of password is undefined, fail if username is None or password is None: return False service = 'login' pam_ = PAM.pam() pam_.start(service) # Set the username pam_.set_item(PAM.PAM_USER, str(username)) # Set the conversation callback pam_.set_item(PAM.PAM_CONV, pam_conv) try: pam_.authenticate() pam_.acct_mgmt() except PAM.error, resp: out.write("Error: " + str(resp) + "\n") return False except: return False # If we get here, the authentication worked return True My problem is that this function does not behave the same wether I use it in a simple script or through mod_python. To illustrate this, I wrote these simple cases: my_username = "markys" my_good_password = "lalala" my_bad_password = "lololo" def handler(req): req.content_type = "text/plain" req.write("1- " + str(auth(my_username,my_good_password,req) + "\n")) req.write("2- " + str(auth(my_username,my_bad_password,req) + "\n")) return apache.OK if __name__ == "__main__": print "1- " + str(auth(my_username,my_good_password,sys.__stdout__)) print "2- " + str(auth(my_username,my_bad_password,sys.__stdout__)) The result from the script is : Query list: [('Password: ', 1)] Our response: [('lalala', 0)] 1- True Query list: [('Password: ', 1)] Our response: [('lololo', 0)] Error: ('Authentication failure', 7) 2- False but the result from mod_python is : Query list: [('Password: ', 1)] Our response: [('lalala', 0)] Error: ('Authentication failure', 7) 1- False Query list: [('Password: ', 1)] Our response: [('lololo', 0)] Error: ('Authentication failure', 7) 2- False I don't understand why the auth function does not return the same value given the same inputs. Any idea where I got this wrong ? Here is the original script, if that could help you. Thanks a lot !

    Read the article

  • friendly url in categories

    - by ntan
    Hi to all, i am trying to use friendly url for my categories. Example Database cat_id | parent_id | name | url 1 0 cat1 cat1 2 1 cat2 cat2 My approach to do is to pass the parameter cat with url value for example show.php?cat=cat1 and in .htaccess i must rewrite to /cat1 BUT what about when i want to access cat2. I want to rewrite as cat1/cat2 so the parameter is show.php?cat=cat1/cat2 and then parse the value to secure that cat2 belong to cat1. And so on. I am not using MVC so i have to do it on my own. Please if any other solutions is better please advice or suggest me reading Thank in advance.

    Read the article

  • Django admin interface upload failing on request data read error

    - by Jake
    Hi All, This is an updated version of an old question I asked. I've now done a lot more testing, plus the old question got hijacked. I'm getting a request data read error when trying to upload files to the Django admin interface. Files under about 150k work, but bigger files always fail and almost always at around 192k (that's 3 chunks) completed, sometimes at around 160k. The Exception I get is below. File "/usr/lib/python2.4/site-packages/django/http/multipartparser.py", line 405, in read return self._file.read(num_bytes) IOError: request data read error I've tried Chrome and Firefox on Windows and Firefox on Mac - Same results. I can upload to other sites so I don't think it's my connection. I'm running python 2.4, django 1.1, mod_wsgi, on CentOS (a media temple DV server) Locally it's fine (Django development server) Everything I've found on this issue says it's a mod_python issue and that changing to mod_wsgi will fix it, but I am running mod_wsgi. Can anyone help?

    Read the article

  • using mod_auth_mysql and mod_auth together

    - by sirrobin
    is it possible to use a database and a flatfile to authenticate a user for a directory. for example, if the requested user is not found in the database, apache should check the flatfile via mod_auth for the user. this is my current .htaccess files AuthMYSQLEnable On AuthName "Restricted" AuthType Basic AuthGroupFile /dev/null AuthMySQLHost localhost AuthMySQLDB members AuthMySQLUser admin AuthMySQLPassword admin123 AuthMySQLUserTable members AuthMySQLNameField username AuthMySQLPasswordField password AuthMySQLPwEncryption md5 require valid-user

    Read the article

  • Can mod_rewrite do math?

    - by ewall
    I am planning to convert my website to a new CMS, but I would like to use mod_rewrite to seamlessly redirect old links to their new locations. The catch is that my new blog will not have the same article numbers as the old, because I'll import some older blog entries in their first. Thus, my mod_rewrite would need to take a URL like old.php?article=125, do the addition to figure out the new article number (say +200, for this example), and redirect to new.php?i=325. Can mod_rewrite do the addition on its own, or am I going to need some kind of 'helper' script to do that?

    Read the article

  • Hide *.inc.php from website visitors

    - by Ghostrider
    I have a script myscript.inc.php which handles all urls that look like /script-blah I accomplish this by using following .htaccess RewriteEngine On RewriteRule ^script-(.*)$ myscript.inc.php?s=$1 [QSA,L] However users could also access it this way by typing /myscript.inc.php?s=blah I would like to prevent that. I tried <Files ~ "\.inc\.php$"> Order deny,allow Deny from all </Files> and RewriteCond %{REQUEST_URI} \.inc\.php RewriteRule .* - [F,L,NS] They both prevent users from viewing /myscript.inc.php?s=blah but they also cause /script-blah to return 403... Is there a way to do this correctly?

    Read the article

  • Problem with configuring mod_wsgi WSGIDaemonProcess option

    - by Yury Lifshits
    I am trying to deploy Pinax bundle of Django framework + and selected applications. Here is my apache config: WSGIDaemonProcess ptest python-path=/home/pinax-env/lib/python2.5/site-packages WSGIProcessGroup ptest WSGIScriptAlias / /home/ptest/deploy/pinax.wsgi When I restart apache I get the following error: Invalid option to WSGI daemon process definition Any ideas what is wrong? I am pretty sure my virtual environment at /home/pinax-env/ works. Is any setup required for daemon process outside of apache config?

    Read the article

  • Zend + Pop Up's balloons on Server Problem

    - by LookUp Webmaster
    Dear Friends from Stackoverflow, Please help me with a problem that i'm having when uploading my project to the server. I'm using pop up's balloons (http://mckay.cshl.edu/balloons.html) for a project using Zend FW and it works fine on my localhost. (I'm using MAMP on MacOSX) but when I upload the webpage to the server, the text inside the balloons is displayed but the images that form the balloon are not, so somehow the js does not recognize the url to the images (the path it's correct, i've checked several times). The server is an Ubuntu 9.04 virtual machine from rackspace.com, running a LAMP server. I'm using the REWRITE function in Apache, so i guess maybe that's the problem. The rewrite configuration is set up using a .htaccess file with the following content: SetEnv APPLICATION_ENV development Options +FollowSymlinks RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !.(js|ico|txt|gif|jpg|png|css|html)$ index.php Does anyone knows what the problem might be? Best Regards,

    Read the article

  • mod_python req.subprocess_env not "seeing" PythonOptions

    - by Brandon
    I'm having trouble getting an environmental variable out of apache config. (don't ask why it's being done this way, I didn't originally code it) This is what I have in the apache config. <Location "/var/www"> SetHandler python-program PythonHandler mod_python.publisher PythonOption MYSQL_PWD ########### PythonDebug On </Location> This is the problem code... #this is the problem code in question. def index(req): req.add_common_vars() os.environ["MYSQL_PWD"] = req.subprocess_env["MYSQL_PWD"] req.content_type = "text/html" statText = getStatText() here is the traceback I'm getting from executing this. Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 213, in handler published = publish_object(req, object) File "/usr/lib/python2.5/site-packages/mod_python/publisher.py", line 425, in publish_object return publish_object(req,util.apply_fs_data(object, req.form, req=req)) File "/usr/lib/python2.5/site-packages/mod_python/util.py", line 554, in apply_fs_data return object(**args) File "/var/www/admin/Stat.py", line 299, in index os.environ["MYSQL_PWD"] = req.subprocess_env["MYSQL_PWD"] KeyError: 'MYSQL_PWD'

    Read the article

  • Application error passthru when using apache mod_proxy

    - by user303442
    Heyas. I'm using mod_proxy with apache2 provide vhost ability to multiple servlet apps running on the local machine. It works fine, for the most part. Requests come into apache then are directed to the application bound on a port on localhost. The app receives the request and responds, which is delivered back to the client by apache. The problem I'm having is that the application delivers 500's on errors, and mod_proxy stomps on them. Often these errors are caused in a ajax request and the error is handled in client side javascript. For example, a call to a server side createObject(name) might throw a NameNotUniqueException , which is delivered back as a 500. The client javascript might then display an appropriate error message. When an error is thrown by the application (resulting in a 500 response to mod_proxy), then apache stomps the error message and returns 500 Internal Server Error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. .. the stock apache server side error message. I want mod_proxy to pass the original 500 back through to the client. Is there a directive I've missed which prevents clobbering of the 500? TIA

    Read the article

  • Building path independent mod_rewrite statements for generic .htaccess file

    - by Pekka
    Say I have three small web applications stored under a shared web root: www.example.com/app1/ www.example.com/app2/ www.example.com/app3/ www.example.com/app4/ each application has a .htaccess file containing some run-off-the-mill mod_rewrite statements to rewrite urls like RewriteCond %{REQUEST_URI} ^/app1/([^/]+)/([^/]+)\.html$ RewriteRule .* /app1/index.php?selectedProfile=%1&match=%2&%{QUERY_STRING} now, I would like to have a generic .htaccess file in each /app{n} directory. So, no RewriteBase and no /app{n} prefix in the RewriteConds. One idea I had was making the first level a wildcard directory as well: RewriteCond %{REQUEST_URI} ^/([^/]+)/([^/]+)/([^/]+)\.html$ seeing as the .htaccess file gets triggered only when the /app{n} directory is entered, this should work. Is this an acceptable solution? Are there other, better ones?

    Read the article

  • htaccess to redirect from domain with sub-directory url to the same url on sub-domain

    - by Ibrahm Yaser
    i have problem of redirecting from domain with sub-directory like http://mydomain.com/project/01/117q803789s92d01 or http://mydomain.com/project/08/117t803789s92d08 .. etc to always http://ww2.mydomain.com/project/01/117q803789s92d01 the other link will to http://ww2.mydomain.com/project/08/117t803789s92d08 ... etc i tried this RewriteCond %{HTTP_HOST} ^mydomain\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ RewriteRule ^project\/\/?(.*)$ "http\:\/\/ww2\.mydomain\.com\/project\/$1" [R=301,L] but for some reason its always redirect me to wrong with missing "\" like if i try to access http://mydomain.com/project/01/117q803789s92d01 redirect me to http://ww2.mydomain.com/project01/117q803789s92d01 Did I miss something?!

    Read the article

  • apache front end using mod_proxy_ajp to tomcat on different servers

    - by user302307
    Anyone knows the steps to run Apache on server A as front end and run mod_proxy_ajp to connect to tomcat instances on server B? I want to run apache on sever A to do name based vhost that connects to many tomcat servers. I can run mod_proxy_ajp, only if apache and tomcat are on the same server. What I've tried so far: In server A, running Apache 2.2: NameVirtualHost *:80 ServerName tc0.domo.lan ErrorLog "C:\Apache\Apache2.2\logs\tc0.ajp.error.log" CustomLog "C:\Apache\Apache2.2\logs\tc0.ajp.access.log" combined DocumentRoot C:/htdocs0 AddDefaultCharset Off Order deny,allow Allow from all ProxyPass / ajp://192.168.77.233:8009/ ProxyPassReverse / ajp://192.168.77.233:8009/ Options FollowSymLinks AllowOverride None Order deny,allow Allow from all Server B: 192.168.77.233, tomcat 6 connector: I can confirm if going to http://192.168.77.233:8080/manager/html, tomcat works. When I use packet sniffer on server A, I found that server A is trying to connect to server B at port 80 when I'm connecting http://tc0.domo.lan/manager/html on server A

    Read the article

  • cannot run c compiled programs. if you meant to cross compile use --host' Ubuntu

    - by Ali.A
    I'm completely new to Ubuntu I downloaded and unpacked a tar.gz package, after extraction, it is said in its documentation : "type ./configure --disable-gts" But when i run this command alone it tells me "Permission Denied" error. Then i tried to use "sh ./configure --disable-gts" insted, but this time i faced this error: configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. How can i overcome these two problems? (I mean permission and compile error) I'm just a rookie and i need urgent help. Thanx

    Read the article

  • .htaccess mod_rewrite is preventing certain files from being served

    - by Lucas
    i have a successful use of mod_rewrite to make a site display as i wish... however, i have migrated the 'mock-up' folder to the root directory and in implementing these rules for the site, some files are not being served in the ^pdfs folder: RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] (old directory) RewriteRule ^redesign_03012010/mock-up/([^/]+)/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1&section=$2 [PT] RewriteRule ^redesign_03012010/mock-up/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1 [PT,L] (new directory) RewriteRule ^([^/]+)/([^/]+)$ /index.php?test=1&page=$1&section=$2 [PT] RewriteRule ^([^/]+)$ /index.php?test=1&page=$1 [PT,L] ... ^pdfs (aka /pdfs/) is not serving the files... any suggestions?

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >