Search Results

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

Page 89/582 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • Apache with mod_php high memory utilization

    - by Raj
    We have Magento application deployed on Apache with mod_php and mysql. I have observed that sometime apache server starts consuming high memory which causes memory swapping and results in high load on servers. whenever there is high load on apache server, the apache processes which are causing the high load were in sleep mode at mysql end and CLOSE_WAIT state at client side. Any help is appreciated to resolve this issue.

    Read the article

  • Invisible Apache redirect

    - by Guilhem Soulas
    I would like subdomain.mydomain.com to invisibly redirect to https://[myServerIP]:2083. (There is an SSL issue here). So far I managed to do it, but the redirection is visible and I don't want it: RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^subdomain.\.mydomain\.com$ RewriteRule ^ https://[myServerIP]:2083/ Would it be a way to achieve the same redirection while maintaining permanently my beautiful "subdomain.mydomain.com" in the address bar? EDIT with the ProxyPass directive: I tried some variations with ProxyPass but it will still change the URL in the address bar: ServerName subdomain.mydomain.com <Location /> ProxyPass https://[myServerIP]:2083/ ProxyPassReverse https://[myServerIP]:2083/ </Location> RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^subdomain\.mydomain\.com$ RewriteRule ^ https://[myServerIP]:2083/ EDIT2: It still doesn't work: #non SSL ServerName subdomain.mydomain.com #SSL! <Location /> ProxyPass https://[myServerIP]:2083/ ProxyPassReverse https://[myServerIP]:2083/ </Location> EDIT3: It now works using the SSLProxyEngine directive: SSLProxyEngine on ServerName subdomain.mydomain.com <Location /> ProxyPass https://[myServerIP]:2083/ ProxyPassReverse https://[myServerIP]:2083/ </Location> I can now access my login interface (cPanel). However, once I'm logged in it doesn't redirect to the next page subdomain.mydomain.com/cpsess5850710203/.

    Read the article

  • Apache redirects directories

    - by Ziaix
    So, I'm trying to redirect any pages to a file, but avoid redirecting anything thats an existing file or directory. RewriteEngine On RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d RewriteRule ^(.+)$ $1 [L] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule ^(.+)$ /index.php?page=$1 [QSA] However, any directories still get redirected (existing files are fine and can be located.)

    Read the article

  • want to make my pages end with HTML

    - by user41997
    here is my current .htaccess For security reasons, Option followsymlinks cannot be overridden. Options +FollowSymlinks Options +SymLinksIfOwnerMatch ErrorDocument 404 /404.php RewriteEngine on rewritecond %{http_host} ^jugep.com [nc] rewriterule ^(.*)$ http://www.jugep.com/$1 [r=301,nc] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^peliculas/([^/]+)$ pelicula.php?pelicula=$1 [L] RewriteRule ^descargar/([^/]+)$ descargar.php?descargar=$1 [L] RewriteRule ^peliculas$ peliculas.php [L] RewriteRule ^peliculas/$ peliculas.php [L] RewriteRule ^buscar$ buscar.php [L] RewriteRule ^buscar/$ buscars.php [L] RewriteRule ^contactar$ contactar.php [L] RewriteRule ^contactar/$ contactars.php [L] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Can someone help me out here, I would like my links to end with a HTML for every link currently a link on my site looks like this (http://www.jugep.com/peliculas/Casino_Royale) I would like it to look like this(http://www.jugep.com/peliculas/Casino_Royale.html) any help is greatly apreciated

    Read the article

  • Can I host my website through gitlab like you can with github pages?

    - by BenWatkinsArt
    I would love to use git to host my website, and would love a platform I can log into online to go along with it (something like Github). You would think in which case, that Github pages would be the perfect route for me, though I don't want to use Github pages. I would like to host this all on my own servers like you do with Github enterprise (but for free). I have found Gitlab and was wondering if there is anyway I can use Gitlab like Github pages. Is it possible?

    Read the article

  • MOD_REWRITE not creating correct path

    - by Bill
    SO I am trying to setup a RewriteRule on my server for caching static objects. the files are in this naming scheme /docroot/css/stylesheet.min.css and I have them printed in the code like /docroot/css/stylesheet.min.123438348.css (the number is example it comes from a get modified function). Note docroot is an example directory how can I have the server ignore the numbers and redirect to the stylesheet.min.css I need to do this for every css and js files (/js and /css) as well as one specific spritemap image my current attempt RewriteRule ^/(docroot)/(js|css)/(.+).(min).(.+).(js|css)$ /$1/$2/$3.$4.$6 RewriteRule ^(/docroot/images/spritemap).([0-9]+).(png)$ $1.$3 Update: Now I have the setup like this RewriteEngine on Options FollowSymLinks RewriteRule ^(.+).(min).([0-9]+).(js|css)$ $1.$2.$4 [L] This is rewriting localhost/docroot/css/stylesheet.min.12343242.css to /var/www/html/docroot/trunk/docroot/css/stylesheet.min.css so it is getting the right file how do I get apache to take off the beginning of the that the /var/www/html/docroot/trunk/

    Read the article

  • Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?

    - by Kyle Brandt
    How can I become an expert at writing mod_rewrite rules? What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?

    Read the article

  • Can you see something wrong in my working .htaccess?

    - by AlexV
    OK, after many search, trial and errors I've managed to create an .htaccess that do what I wanted (see explanations and questions after the code block): <IfModule mod_rewrite.c> RewriteEngine On #1 If the requested file is not url-mapper.php (to avoid .htaccess loop) RewriteCond %{REQUEST_FILENAME} (?<!url-mapper\.php)$ #2 If the requested URI does not end with an extension OR if the URI ends with .php* RewriteCond %{REQUEST_URI} !\.(.*) [OR] RewriteCond %{REQUEST_URI} \.php.*$ [NC] #3 If the requested URI is not in an excluded location RewriteCond %{REQUEST_URI} !^/seo-urls\/(excluded1|excluded2)(/.*)?$ #Then serve the URI via the mapper RewriteRule .* /seo-urls/url-mapper.php?uri=%{REQUEST_URI} [L,QSA] </IfModule> This is what the .htaccess should do: #1 is checking that the file requested is not url-mapper.php (to avoid infinite redirect loops). This file will always be at the root of the domain. #2 the .htaccess must only catch URLs that don't end with an extension (www.foo.com -- catch | www.foo.com/catch-me -- catch | www.foo.com/dont-catch.me -- don't catch) and URLs ending with .php* files (.php, .php4, .php5, .php123...). #3 some directories (and childs) can be excluded from the .htaccess (in this case /seo-urls/excluded1 and /seo-urls/excluded2). Finally the .htaccess feed the mapper with an hidden GET parameter named uri containing the requested uri. Even if I tested and everything works, I want to know if what I do is correct (and if it's the "best" way to do it). I've learned a lot with this "project" but I still consider myself a beginner at .htaccess and regular expressions so I want to triple check it there before putting it in production...

    Read the article

  • Apply rewrite rule for all but all the files (recursive) in a subdirectory?

    - by user784637
    I have an .htaccess file in the root of the website that looks like this RewriteRule ^some-blog-post-title/ http://website/read/flowers/a-new-title-for-this-post/ [R=301,L] RewriteRule ^some-blog-post-title2/ http://website/read/flowers/a-new-title-for-this-post2/ [R=301,L] <IfModule mod_rewrite.c> RewriteEngine On ## Redirects for all pages except for files in wp-content to website/read RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !/wp-content RewriteRule ^(.*)$ http://website/read/$1 [L,QSA] #RewriteRule ^http://website/read [R=301,L] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> My intent is to redirect people to the new blog post location if they propose one of those special blog posts. If that's not the case then they should be redirected to http://website.com/read. Nothing from http://website.com/wp-content/* should be redirected. So far conditions 1 and 3 are being met. How can I meet condition 2?

    Read the article

  • RewriteMap syntax Regex

    - by ienabellamy
    in my .htaccess i've tons of directives, with same syntax: RewriteRule ^(.*)/PRODUCT_1.aspx http://www.site.com/product.php?id_product=2891 RewriteRule ^(.*)/PRODUCT_2.aspx http://www.site.com/product.php?id_product=2896 and everything works. Now, i created a RewriteMap in my because i need to increase velocity (20.000 redirect 301 in htaccess no good), so: RewriteEngine On RewriteMap redirects dbm=db:/var/www/html/presta152/prestashop/redirects.db RewriteCond ${redirects:$1} !="" RewriteRule ^(.*)$ ${redirects:$1} [redirect=permanent,last] and my redirects.db is created by redirects.txt, that contains: /PRODUCT_1.aspx http://www.site.com/product.php?id_product=2891 /PRODUCT_2.aspx http://www.site.com/product.php?id_product=2896 this works if i try to call for example: www.site.com/PRODUCT_1.aspx i'm redirected... but if i try to call www.site.com/everythingpossibileinside/PRODUCT_1.aspx the redirect doesn't work. So, in my .htaccess this rule: RewriteRule ^(.*)/PRODUCT_1.aspx http://www.site.com/product.php?id_product=2891 works, but in my RewriteMap no. I think i must change this directive: RewriteRule ^(.*)$ ${redirects:$1} [redirect=permanent,last] i tried, but unsuccessful. Thanks to all.

    Read the article

  • ModRewrite Domain

    - by Mike Knoop
    I've done a little research into ModRewrite rules and conditions but have not been able to find a satisfactory set of rules/conds which achieve the effect I'm looking for. Essentially, I have a directory on domain A (http://www.domaina.com/dir/) which I would like to redirect to a different directory on domain B (http://www.domainb.com/diff_dir/). Note that I only want to apply the rewrite rule if the user is attempting to access /dir/ on domaina. If they are accessing a different directory or root I do not want to rewrite the URL. Thank you!

    Read the article

  • htaccess rewriting all subdomains to subdirectories

    - by indorock
    I'm trying to build a catch-all for any subdomains (not captured by previous rewrite rules) for a certain domain, and serve a website from a subdirectory that resides in the same folder as the .htaccess file. I already have my vhosts.conf to send all unmapped requests to a "playground" folder, where I want to easily create new subdomains by simply adding a subfolder. So, my structure looks like this: /var/www/playground |-> /foo |-> /bar The .htacces living inside the /playground folder and /foo and /bar being seperate websites. I want http://foo.domain.com to point to /foo and http://bar.domain.com to /bar. Here is my .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} ^([^.]+).domain.com$ [NC] RewriteCond %{REQUEST_URI} !^/%1/(.*) RewriteRule ^(.*) /%1/$1 [L] This is supposed to capture the subdomain, add it as a subfolder in RewriteRule, then append after the slash and path information. The second RewriteCond is there to prevent an infinite loop. My idea was that %1 in the second RewriteCond would be able to capture the capture group in the first RewriteCond. But so far I haven't had any success, it's always ending up in a redirect loop. If I would replace %1 in the second RewriteCond with hardcoded 'foo' or 'bar', it works, which leads me to believe that you cannot refer to a capture group inside a RewriteCond. Is is true? Or am I missing something?

    Read the article

  • mod_rewrite and Apache questions

    - by John
    We have an interesting situation in relation to some help desk software that we are trying to setup. This is a web based software application that allows customers and staff to log into it and access tickets and supply updates, etc. The challenge we are having deals with the two different domains that we use and the mod_rewrite rules to make it all work with our SSL certificate that is only bound to one of the domains. I will list the use case scenarios below and the challenges that we are having. If you access http://support.domain1.com/support then it redirects fine to https://support.domain2.com/support If you access http://support.domain2.com/support then it redirects fine to https://support.domain2.com/support If you access https://support.domain1.com/support then it throws an error of "server cannot be found" If you access https://support.domain1.com/support/ after having visited https://support.domain2.com/support then you are presented with a "this connection is untrusted" error about the certificate only being valid for the domain2 domain instead of the domain1 domain name I have tried just about every mod_rewrite rule that I can think of to help make this work and I have not been able to locate the correct combination. I was curious if anyone had some ideas on how to make the redirects work correctly. In the end, we are needing all customers and staff to land at https://support.domain2.com/support regardless of the previous URL combinations that they enter, like listed above. Thanks in advance for your help with this.

    Read the article

  • Trying to make mod_rewrite to work on Windows

    - by Psyche
    Hello guys, I'm having some trouble confinguring Apache mod_rewrite on Windows. I'm using latest version of XAMPP on Windows Vista. Here's my httpd.conf file: LoadModule rewrite_module modules/mod_rewrite.so <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory "D:/Server"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> My .htacces file looks like this: Options +FollowSymLinks RewriteEngine On RewriteBase /wcc/ RewriteRule ^red-wines/$ /red-wines.php [L] When I try to access http://localhost/wcc/red-wines/ I get a 404 not found error. Any ideea why? Thanks.

    Read the article

  • Apache Rewrite Rules

    - by Philip
    I have moved my website from a Wiki to Wordpress and in the process, realised that I have broken links to some popular pages on my website. Is it possible to fix this with a rewrite rule? I need the rule to redirect anything beginning with "^/wiki/(.+)$" to "/$1" but also replacing the "_" character used in MediaWiki slugs to "-" used in Wordpress slugs. For example: http://example.com/wiki/An_Example_Page should be pointed to: http://example.com/an-example-page Is it possible to write such a rewrite rule? Edit: It appears that Wordpress doesn't even care if the "/wiki/" part is removed - provided the slug matches, and that seems to be case-insensitive too. So all I need to do is change the "_" characters to "-" in the slugs.

    Read the article

  • mod_rewrite to redirect to specific WP page

    - by djdy
    The goal is to redirect all requests coming to Wordpress from IE 6 and 7, to a specific Wordpress page using mod_rewrite. My confusion comes from multiple conditions that are needed for the rewrite not entering an endless loop once on the specific Wordpress page. So the condition must be: (IE 6 or 7) and request is not the same as the page we are sending them to. I've tried things along the lines of: RewriteCond %{HTTP_USER_AGENT} MSIE\ ([67])\. RewriteCond %{REQUEST_URI} !iepage RewriteRule .* /iepage/ [R] In IE 6 and 7, I get page cannot be displayed errors. Could it really mean too many redirects, because the 2nd condition isn't working?

    Read the article

  • Authentication through mod_auth_kerb should provide website with no user if no TGT provided

    - by loomi
    Users are authenticated by mod_auth_kerb which works great. Therefore I need to set Require valid-user If there is no valid user Apache fails with an 401 Authorization Required. I would like Apache to deliver the website anyway but not providing a remote_user to the underlying script. This is related to How to tell mod_auth_kerb to do its job despite no "require valid-user". But with the important difference that on a whole subdirectory on every url a kerberos negotation should be initiated, and if it fails it should deliver the content anyway.

    Read the article

  • mod_security: How to allow ssh/http access for admin?

    - by mattesque
    I am going to be installing mod_security on my AWS EC2 Linux instance tonight and need a little help/reassurance. The only thing I am truly worried about right now is making sure my (admin) access to the instance and webserver is maintained w/o compromising security. I use ssh (port 22) and http (80) to access this and I've read horror stories from other EC2 users claiming they were locked out of their sites once they put up a firewall. So my question boils down to: What settings should I put in the mod_security conf file to make sure I can get in on those ports? IP at home is not static. (Hence the issue) Thanks so, so, so much.

    Read the article

  • mod_rewrite [L] flag not working as expected?

    - by bobobobo
    I thought the [L] flag indicated that "this rule should be the last rule processed for this http request.." However when I have 2 rules like: RewriteRule ^test$ php/test.php [L] RewriteRule (.*) error.php What always happens is requests to http://localhost/test go to error.php, not to test.php as I expected, since I put the [L] there. If you comment out the second rule there, then requests to http://localhost/test go to test.php as expected. What I'm really trying to do is catch 404 errors with mod_rewrite. Its possible what I'm trying to do is just plain wrong. But I still want to know why the catch-all rule is active since I did put an [L] after the ^test rule. I see a large listing in here where the server admin lists a bunch of paths that begin with the recognized directories, but I wanted to avoid doing this by simply using a nice catch-all rule.

    Read the article

  • Apache mod_rewrite not working properly on Mac OS X 10.6 (Snow Leopard)

    - by DashRantic
    Hello all, I'm trying to create a PHP website with clean URLs with Apache's mod_rewrite, using a .htaccess file. mod_rewrite seems to be working, however, it claims it cannot find files on my server that do exist. Just as a basic test, this is what my .htaccess file looks like at the moment--going to [mysite]/page should redirect to the index.php file: Options +FollowSymLinks RewriteEngine on RewriteRule ^page$ index.php Afaik, I have setup the .conf file appropriately as well: <Directory "/Users/myuser/Sites/"> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all </Directory> However, when I try accessing the URL setup via mod_rewrite ( localhost/~myuser/mysite/page ), I get this: Not Found The requested URL /Users/myuser/Sites/mysite/index.php was not found on this server. However, that file does exist, and that is the proper location! The site works fine otherwise, if I go to localhost/~myuser/mysite/index.php, everything works fine--minus any sort of clean URLs, of course. Has anyone seen this before/have any ideas as to what I'm doing wrong?

    Read the article

  • mod_rewrite and % character

    - by pekrimen
    I need to rewrite a URL that contains one or more strings of characters incling a % character (for instance %123) into another string of characters including a % character (for instance %234). I am able to do this using the special THE_REQUEST attribute with something like this: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\%123(.*)\ HTTP RewriteRule .* /%1\%234%2 [R,NE] However, this does not work for URLs that contain more than one "%123" strings... The N option has no efect as it seems that the value of THE_REQUEST is not changed. Any ideas?

    Read the article

  • Apache RewriteRule and slashes (%2F)

    - by Felix
    I have the following RewriteRule: RewriteRule ^like/(.+)$ ask.php/$1 Which works just fine for requests like: /like/someting+here/something+else But for requests where one of the path parts contains an escaped slash (%2F), the server spits out a 404 Not Found error: /like/one%2Ftwo+things/ Is there any way to fix this? I tried both [B] and [NE] flags (separate and together) but nothing worked.

    Read the article

  • Apache, Nginx, WSGI, django cookies get lost.

    - by Jack M.
    I'm running into a problem trying to get a Django application running in my staging environment. I'm running nginx as a reverse proxy with Apache 2.2/mod_wsgi as the target, and my Django app behind that. The problem is that the cookies are getting lost somewhere between nginx and Apache. My nginx.conf (ripped out a few locations to keep it small): http { gzip on; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_header Set-Cookie; upstream django { server 127.0.0.1:8080; } server { listen 80; server_name encendio.iigins.com; location / { proxy_pass http://django; } } } My Apache vhosts file: <VirtualHost *:8080> ServerName encendio.test.com ServerAdmin [email protected] DocumentRoot "/usr/local/www/apache22/data" WSGIScriptAlias / /usr/local/www/apache22/data/sasquatch/wsgi_handler.py </VirtualHost> If I directly to http://encendio.test.com:8080/ the cookies work and I can log into the admin area. If I log into http://encendio.test.com/, the admin area tells me my browser isn't using cookies. Now things get kind of weird. I went so far as to look at the environ being passed into my wsgi_handler.py: _application = django.core.handlers.wsgi.WSGIHandler() def application(environ, start_response): print >> sys.stderr, environ.get('HTTP_COOKIE', "No Cookie") return _application(environ, start_response) It shows the cookie existing in the environment: [Mon Mar 22 12:15:50 2010] [error] csrftoken=9f2569elkj67984242f0e7a6dea0b791; sessionid=4e5432hjkds8603f26d5ffa02b10cd27 And this cookie matches up with what I see in nginx's log if I plug in $http_cookie on the end of the log. So Apache is getting the cookie in some form, but it's not ending up where Django can see it. I'm at my wit's end for why this isn't working, so any help is greatly appreciated. Ninja Edit: I forgot to mention that Firefox is seeing the cookies. The oddity is that every time I attempt to log in, I get a new sessionid.

    Read the article

  • htaccess mod_rewrite check file/directory existence, else rewrite?

    - by devians
    I have a very heavy htaccess mod_rewrite file that runs my application. As we sometimes take over legacy websites, I sometimes need to support old urls to old files, where my application processes everything post htaccess. My ultimate goal is to have a 'Demilitarized Zone' for old file structures, and use mod rewrite to check for existence there before pushing to the application. This is pretty easy to do with files, by using: RewriteCond %{IS_SUBREQ} true RewriteRule .* - [L] RewriteCond %{ENV:REDIRECT_STATUS} 200 RewriteRule .* - [L] RewriteCond Public/DMZ/$1 -F [OR] RewriteRule ^(.*)$ Public/DMZ/$1 [QSA,L] This allows pseudo support for relative urls by not hardcoding my base path (I cant assume I will ever be deployed in document root) anywhere and using subrequests to check for file existence. Works fine if you know the file name, ie http://domain.com/path/to/app/legacyfolder/index.html However, my legacy urls are typically http://domain.com/path/to/app/legacyfolder/ Mod_Rewrite will allow me to check for this by using -d, but it needs the complete path to the directory, ie RewriteCond Public/DMZ/$1 -F [OR] RewriteCond /var/www/path/to/app/Public/DMZ/$1 -d RewriteRule ^(.*)$ Public/DMZ/$1 [QSA,L] I want to avoid the hardcoded base path. I can see one possible solutions here, somehow determining my path and attaching it to a variable [E=name:var] and using it in the condition. Another option is using -U, but the tricky part is stopping it from hijacking every other request when they should flow through, since -U is really easy to satisfy. Any implementation that allows me to existence check a directory is more than welcome. I am not interested in using RewriteBase, as that requires my htaccess to have a hardcoded base path.

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >