Ubuntu Servers :: Apache Mod_rewrite Not Working?
Jun 27, 2011
I have mod_rewrite and mod_proxy loaded properly for the apache2 package in 11.04. I added the following to the bottom of my apache2.conf:
RewriteEngine: On
RewriteRule: ^/$ /test [L]
The server restarts fine, but / is not getting rewritten in the slightest. And when I added the RewriteLog directive, the log file had absolutely nothing in it.
View 3 Replies
ADVERTISEMENT
Jun 1, 2010
I want to enable Pretty URLs in Concrete5 and Joomla CMSs. So far I have- enabled pretty urls in the CMS- created .htaccess files (as they showed)- changed AllowOverride None to All in /etc/Apache2/httpd.conf <directory>- restarted ApacheBut the pretty urls still don't work, When I click any link on either site it gives me a page not found error. If I use the "non-pretty" URLs, all the links work. So I guess Apache either doesn't read the httpd config file or it doesn't read the .htaccess files or something else. Has anyone got this working? What else did you do?
View 9 Replies
View Related
May 1, 2011
On one of my servers (Centos 5.5), I have been hosting articularly complex CRM application for one of my clients. Recently they have asked about configuring SSL connections to the CRM. Problem is, SSL is already configured for their main domain but not the sub-domain where the CRM application is accessed. Rather than purchasing another SSL certificate for their sub-domain (and probably another IP address),ld it be possible to setup a redirection from the subdomain to a sub-directory in the SSL directory using mod_rewrite. I have searched online and through the other posts on LinuxQuestions but nothing I have tried works.For example:[URl]
View 2 Replies
View Related
Apr 17, 2011
Trying to track down reasons why mod_rewrite won't load, I found this site; hopefully, this will reduce the idiocy of this question.
Based on it and other sources:
Code:
graton# locate mod_rewrite.so
/root/share/openh323/lib/apache2/modules/mod_rewrite.so
/root/share/pwlib/lib/apache2/modules/mod_rewrite.so
[code]...
View 2 Replies
View Related
Aug 29, 2010
My .htaccess file looks like this:
Code:
Options -indexes
RewriteEngine on
RewriteBase /
[Code].....
View 3 Replies
View Related
Nov 25, 2010
I want to use rewite module to change my site url from site/index.php to site/cat/ for example I have created .htaccess file in the directory where the file is and add to it:
Code:
RewriteEngine on
Rwerite ^cat$ /site/index.php
Here site is not my site, it just in example. I have rewrite.load in the loading list of modules and I can see it loads in phpinfo(). AllowOverride is set to All for the current site, but no redirect is made on site/cat
View 2 Replies
View Related
Jan 20, 2010
I have a virtual server setup on port 80 that works fine, however, if I change the port to, say, 8080 the browser then fails to connect.I'm using webmin to configure everything, all the other settings seem to work as I would expect.I get the error "Safari canī open the page http://192.168.0.12:8080 because Safari cant connect to the server 192.168.0.1." in safari, and i get something similar on the xubuntu machine in firefox connecting via localhost.It's almost as though theres a firewall in the way, but I think it's more likely to be some config problem.
View 2 Replies
View Related
May 31, 2010
I have tried setting apache up on port 8000, because my ISP blocks port 80.
When I try to listen on just port 8000, I can never connect, internally or externally. When I try to listen on both 8000 and 80, my internal computers will drop the 8000 from the url and connect on 80, and external computers try to do the same thing, but can't get through on port 80.
I know my router is set up correctly, I have 80, 8000, and 8888 all being forwarded, I have confirmed with [URL] that 80 is blocked, but 8000 and 8888 are open. I am able to connect to gnump3d through port 8888 internally and externally, but not apache2 on port 8000.
netstat -tnap confirms that apache is running and listening on ports 80 and 8000 to all users.
View 9 Replies
View Related
Jul 19, 2010
I had directory browsing enabled in Apache on a previous computer, but I can't get it working again:heres my apache2.conf
Code:
#
#Based upon the NCSA server configuration files originally by Rob McCool.
[code].....
View 6 Replies
View Related
Sep 23, 2010
I want to setup a folder (several really) for websites that use PHP.
I am running Linux Ubuntu with PHP, APACHE installed.
The Apache server works in Firefox as 127.0.1.1 no problem.
The default directory is (DocumentRoot) /var/www This is stored in a file called /etc/apache2/sites-enabled/000-default
PHP executes no problem, if it is in the default directory (/var/www).
However, I'd like to activate PHP in a folder on another hard-drive (also).
In that folder I'd like to store several websites, all which will use PHP and MYSQL.
The problem is, my boot drive where /var/www currently is located has only 2 gig of space (21 gig for operating system, which seems high).
PHP files in the other hard drive do not execute, even under APACHE server.
How can I safely change the PHP enabled folder? How can I add more folders, without erasing the current one?
View 2 Replies
View Related
May 3, 2010
I have Webmin installed on an Ubuntu server. I currently have a successful apache server running on port 80, however I want to create a virtual host on port 81. When I try I go to servers->Apache Webserver-> Create Virtual Host I change the port to 81 and the document root to /var/port81www then I click create. How ever when I goto 192.168.1.5:81 (local ip, I know I have to port forward but its not even working local) it does not work.
View 5 Replies
View Related
Aug 18, 2009
I want to run a linux command with apache through web browser and that's is not working. and it's working properly when I execute this command through terminal, where is the problem?
NOTE: apache have the privileges to execute the command
View 7 Replies
View Related
Jan 22, 2010
I would like to use mod_rewrite to rewrite all instances of .php and _ in file names in the root directory
So far I have:
But this throws out error 500. Could someone correct my code?
View 1 Replies
View Related
Aug 16, 2011
I am still struggling to get non-www to www. At the moment I have following code to redirect from non-www to www. RewriteCond %{HTTP_HOST} !^www.hoteldealscatcher.com$ [NC]
RewriteRule ^(.*)$ http://www.hoteldealscatcher.com/$1 [R=301,L]It works totally fine for home page but not for other deep links, such as /city/Sydney.php, they are still going to non-www pages. What 's the best approach I could use to solve it
View 6 Replies
View Related
Apr 25, 2011
I have tried this a million ways, got it to work once but it didn't work sitewide for some reason. I have a url: [URL] and I want it to be found by going to: [URL] I am using this
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^([^/]+)/?$ agents/tp/$1/index.php [L]
and have also tried something as basic as
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^(.*)$ agents/tp/$1/index.php [L]
I keep getting "The requested URL /JoeAgent/ was not found on this server." why it's not working?
View 4 Replies
View Related
Sep 9, 2010
I've given a bit of support using Mod_rewrite to use magical urls to redirect to scripts, but when I migrated to Ubuntu's Apache2... I'm lost. I basically want to rewrite like this:
Code: RewriteRule ^artist/(.+)/$ artist.php?artname=$1 But I noticed that it wasn't passing the artist=$1 to the server GET vars. Then I noticed that if I changed the name of the file in both the rule and the file system to artists.php, typing artist/blah/ no longer was found. So then I realized that if I removed the rewrite rule artist/hello/ would still resolve to artist.php without any parameters my htaccess is like so:
[Code]...
View 1 Replies
View Related
Feb 19, 2011
I have ubuntu 10.10. I installed apache2 Php mysql and phpmyadmin through the package handler. it worked after that I instaled Imagemagick , and imagick for PHP. than I installed mod_rewrite for appache2. I created a folder in /var/www/ called shimmie. I copied there my codes and after setting up htaccess it worked fine. url rewrite worked. thumbnails with imagick appeared along with normal images. Yesterday I got another webpage project. but it required apache mod_ expires and mod_headers and installed it. And installed Xdebug for PHP. after this I put the webpage to another /var/www/ folder called fashion. Now in fashion everything works as its needs to: url rewrite , expires.. everything. But now my original folder shimmi, doesnt works: no url rewrite, no imagick thumbnails nor the original image shows up.
the folder belongs to my user and set is that every thing can read it and write it.
EDIT: I even copied the shimmie folder toa new and still didnt work, so i re created it... and still doesn't work.... why is thats the only thing that cant use .htacces and imagick?
[URL]
View 1 Replies
View Related
Jun 3, 2010
I am running Apache2 on Novell SLES 11. I am using Virtual Hosting for two sites. One site only has a single domain whereas the other site has two domains registered. surrounding my one virtual host with the two domains. I want anyone that point to [URL] gets redirected to [URL]. I am trying to do this for trending but not 100% on how to go about doing this. I've read about mod_rewrite but most of the information I've read about is about a single site running on Apache and not much around Virtual Hosting within Apache. I am currently using Server Alias within my vhost.conf file which allows either [URL] or [URL] to see the site but I really want to redirect [URL] to [URL].
View 12 Replies
View Related
Apr 23, 2010
I've run into a problem and I don't know if it's apache or php or the combination of both. I can compile apache 2.2.15 just fine, but whenever I try to compile php 5.3.2 into my server, the first two steps work just fine but when I get to the make install part it shows the libphp5.so and it just stays there and I have to cancel the install because it won't finish.
View 5 Replies
View Related
Sep 1, 2010
just switched our company from windows server to linux and everything is going good except we have 4 vpn connections though out the country coming to our server. All giving the client machines ip addresses of 192.168.x.x based on where they are located 192.168.1.x for the main location 192.168.2.x for a second location etc, and IIS could see the clients ip instead of the wan ip and was setup to block all ips except 192.168.x.x ip's and this worked great.
So i set up apache the same way, to allow only 192.168 ip's but i guess it doesn't work that way in apache for connections coming though vpn? 2 out of our 4 VPN connections are not static IP's, so the 2 that are I just add that ip to the allow list and that worked.But i don't think we should HAVE to get static ips for the other 2, that's one of the benefits of using VPN, especially if our old windows server didnt need it.Is there any way for apache to see the clients ip address for access or is there something somewhere else that needs changed for this?
View 8 Replies
View Related
Oct 6, 2010
I've got some strange looking requests in my access_log which I don't much like the look of. Can someone take a look and let me know if 1) it's possible for other people to use my server as a proxy, and 2) how I can stop them.
Code:
85.190.0.3 - - [06/Oct/2010:14:32:55 +0100] "CONNECT 213.92.8.7:31204 HTTP/1.0" 200 1606
85.190.0.3 - - [06/Oct/2010:14:32:55 +0100] "CONNECT 213.92.8.7:31204 HTTP/1.0" 200 1606
85.190.0.3 - - [06/Oct/2010:14:32:55 +0100] "GET http://vlad-tepes.bofh.it/proxy.txt HTTP/1.0" 404 1955
85.190.0.3 - - [06/Oct/2010:14:32:55 +0100] "GET http://vlad-tepes.bofh.it/proxy.txt HTTP/1.0" 404 1955
85.190.0.3 - - [06/Oct/2010:14:32:55 +0100] "CONNECT 213.92.8.7:31204 HTTP/1.0" 200 1606
[Code]...
View 9 Replies
View Related
Nov 14, 2010
My Server is 8.04 (hardy) and Apache is 2.2.8. I have been receiving emails from Apache each time a new stable release is available, most of which say you should install them due to security issues. The current stable release of apache being offered is 2.2.17
Q1) Do you recommend I upgrade from Apache 2.2.8 to 2.2.17?
Q2) Does this come automatically with my regular updates via Update Manager once the Ubuntu community thinks its stable enough (it appears that it doesn't)?
Q3) What is the best way to install the update?
Q4) Any concerns about installing it into a live environment? I don't have a development platform to try it in first.
View 3 Replies
View Related
Dec 7, 2010
When starting Apache I get this error in 10.10 (not in 9.10): [Fri Dec 03 21:14:22 2010] [error] (2)No such file or directory: could not open transfer log file /etc/apache2/${APACHE_LOG_DIR}/other_vhosts_access.log. Unable to open logs So where do I define APACHE_LOG_DIR ?
View 4 Replies
View Related
Dec 9, 2010
I'm looking to run some R scripts on a mysql database (engine =csv) from the apache webserver.
The goal is to record some statistics/numbers while someone is logged in, pass those numbers to r, run some statistics algorithms on the passed set of data and output an image file back to the logged-in user's html web page.
Doing this along with knowledge on how to call general r functions from within a php framework would be great.
View 1 Replies
View Related
Mar 6, 2011
I would like to add ROR to my web server, but I would still like to keep php. I tried doing this a few days ago, but it made my PHP unusable so that it would ask me to download a file rather than displaying the php page. how to install ruby on rails without trashing my system again.
View 3 Replies
View Related
May 10, 2011
I was wondering if anyone knows how to make a zone file for bind dns server that points "example.com" and all (by all i mean any) sub-domains to this 127.0.0.1 address. and i wanted to set up a virtual host in apache to use /var/www/eample/index.php for 'example.com' and all of its sub-domains.
View 1 Replies
View Related
May 12, 2011
Can anyone point me to a good apache GUI?
Ive read online about webmin, ebox etc but are there any others? I'm using gnome on my server and i did a search through the Ubuntu software Centre but nothing came up.
View 2 Replies
View Related
Jun 12, 2011
So here is my problem. I have websiteA.com and websiteB.com. I only have one public IP address. And websiteB needs to be constantly restarted, so both need to be on separate apache servers or instances.Virtual directories wont work cause I can only point websiteA to a directory /var/www/websiteA.Reverse proxy wont work cause I can only catch a sub directory.Proxy /websiteA/ URL...Does anyone know how I could get this to work in anyway.
View 4 Replies
View Related
Jul 29, 2011
Im trying to just set up my web page so it can be seen on my local home Lan (then Ill try to get it on the internet). I can see the site it on my pc but other network users cant.
They can ping my computer but cant telnet to it on port 6060 (thats the one is set the server up on)
What's wrong with my configuration its mostly the default with a few changes that I hoped would make the site work.
My ip 192.168.1.10
Here is the sites-available default file
Quote:
View 7 Replies
View Related
Jan 17, 2010
When I go to localhost, and try to open any PHP file, it asks me to download the file rather than run it like it should. JSP doesn't appear to be working either. I'm not to concerned about the JSP though.
I'm running KUbuntu 8.04 with KDE 3 on a 64bit machine.
View 9 Replies
View Related