Ubuntu Servers :: HTAccess Stopped Working For 301 Apache2

Apr 29, 2010

I am not sure what happened, but my .htaccess file is no longer working for my 301 redirects. I did have a hard time getting it working a few weeks back (when I first set it up), unfortunately I did not document it well. Main question is for multiple sites getting redirected, do I want the additional sites listed as aliases? My original setup virtual host config listed seven additional hostnames as aliases.

I later had difficulty with google listing these secondary domains within search result and hurting my page rank. So I setup 301 redirects, and from memory, I had to leave the alias names for the .htacces 301 redirect to work. Now it won't work either way. Can anyone tell me if the aliases need to be in place? Do I need to setup individual vhost files and add an .htacces 301 for each? What is the preferred way to do this? I tried reloading apache2 but it did not help.

Permissions for .htacces:
Code:
-rwxr-xr-x 1 eric www-data 866 2010-04-14 12:06 .htaccess
Attaced is my .htaccess. It resides in the site root directory. Also attached is the virtual host config file.
httpd.conf

Code:
NameVirtualHost *
NameVirtualHost *:443
AddHandler cgi-script .pl
RewriteEngine On

I'm still not sure after hours of reading the various how-to's, what should the file permissions be for the .htaccess. I have not performed any updates during the period it was working till now.

View 2 Replies


ADVERTISEMENT

Ubuntu Servers :: Apache2 Just Stopped Working - 403 Error

May 27, 2011

I have just booted up to do some local work on my website and apache 2 has start throwing 403 error's at me? phpmyadmin and other alias's I have setup work but the main root just 403's on me?? It has been working away flawlessly for months now. No system upgrade has recently updated Apache and I can see no errors in my set up files!

My default setup file:
Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /home/gavin/wwwsite
<Directory "/home/gavin/wwwsite">
Options +Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory> .....

View 2 Replies View Related

Ubuntu Servers :: Apache2 Vhost Stopped Working After Changing Routers Internal Ip

Apr 8, 2011

I run ubuntu 10.10 with apache2 and have 2 virtual hosts set up

here is an example of one of the virtual hosts

<VirtualHost *:80>
ServerName blah.endofinternet.org
ServerAlias blah.endofinternet.org
ServerAdmin davidboychuck@gmail.com
DocumentRoot /var/www/blah

[Code]....

Everything was working perfectly until i changed the internal ip of my router from 192.168.1 to 192.168.192 and now virtual hosting no longer works. As far as I can tell everything is setup correctly. I made no changes to the configuration files. Vhosts just literally stopped working. I've tried clearing dns cache not sure what to do at this point. I have tried to a2dissite and then a2ensite and reload the configurations but it literally just seems like apache is not looking for the vhosts in /etc/apache2/sites-enabled even though my apache2.conf still includes them

#Include the virtual host configurations:
Include sites-enabled/
From the apache error log:
[Sun Apr 03 16:41:50 2011] [error] [client 66.249.72.208] script '/var/www/index.php' not found or unable to stat

[Code].....

It looks like it's just not trying to use the vhost document root because when i go to blah.endofinternet.org it just takes me to the default site.

View 2 Replies View Related

Ubuntu Servers :: Apache2 - HTAccess Will Not Work

Feb 9, 2010

I'm a newb when it comes to linux operating systems so I'm attempting to get better through experience. I work for a web development company and we use Ubuntu for our operating systems (the programmers at least). Anyways, I'm trying to install LAMP services and get them working. I have all L.A.M.P. services installed... but Apache2 is giving me a problem. I have an .htaccess file installed in a directory under my document root. But Apache2 is not interpreting it. I have AllowOverride All on but I can't figure it out. I did make a bogus .htaccess file attempting to make apache give me a error, nothing.

View 2 Replies View Related

Ubuntu Servers :: .htaccess Working, Rewrite Not Working Properly?

Apr 25, 2011

I had a problem with apache2 and getting .htaccess working. I have done some things and i believe its working the ErrorDocument command is anyway. I believe there may be some problems with the rewrites though.Im trying to take a urlhttp://localhost/showthread/123and make it display whats on http://localhost/index.php?showthread=123The rewrite rule is Quote:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^showthread/([^/.]+)/?$ index.php?showthread=$1 [L]

[code]....

View 8 Replies View Related

Ubuntu Servers :: Changed AllowOverride Still HTAccess Not Working

Apr 6, 2010

I have followed the tutorial from this site [URL]. I have changed this file /etc/apache2/sites-available/default and in this file I have changed AllowOverride None to AllowOverride All but still I get:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. I have installed and reinstalled apache 2 time already.

View 8 Replies View Related

Debian :: Enabling HTAccess In Apache2 For Lenny

Aug 25, 2011

My distro is Lenny. I am struggling with trying to enable .htaccess files. I followed a ubuntu tutorial that did not work at all. How do I enable .htaccess files in all apache2 directories for Debian 5.0 Lenny?

View 1 Replies View Related

Ubuntu Servers :: Apache2 Not Working After Update To 10.10

Oct 12, 2010

i did the update for server 10.4 to 10.10 and now my apache 2 not working.

View 1 Replies View Related

Ubuntu Servers :: Php Stopped Working After Update

Mar 19, 2010

Today i made an update using Webmin, and after that php stopped working, instead of running the files it launches a download. So i checked what was going on, and php module was disabled in apache config. When trying to enable it, it said the file "/usr/lib/apache2/modules/libphp5.so" did not exist, and indeed it disapeared. I tried to reinstal php and apache (with and without --purge, through apt) and it didn't solved the problem.

Also i tried copying the file from another machine, also without success (this time it shows " Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.") Dont know what to do now, im kinda desperated here because this machine hosts my website =P

View 2 Replies View Related

Ubuntu Servers :: SSH Stopped Working - Cannot Restart

May 26, 2011

I am running a headless home file server with ssh, samba, webmin and webgui for Transmission. It was all working fine on my lan until I tried to set ssh to listen on a different port (I read it was safer to do so if you wanted access from the internet). Now I cannot ssh into my server and as far I can tell using webmin the ssh process is no longer running and I cannot restart it. I have restored my unmodified sshd_config file. After restoring my original config file and rebooting I am back and working.

View 2 Replies View Related

Ubuntu Servers :: Samba Stopped Working After IP Changed

Sep 13, 2010

I run Samba version 3.4.7 as a Domain server for our company, and recently we reorganized our IP-addresses. And the Samba server also got a new IP-address. (192.168.1.60 -> 192.168.1.22). However, now new computers can not join the domain, and old ones can not connect to it correctly (they get a temp profile).

Windows XP gets a temp profile when connecting, and when trying to join a domain I get this error "A domain controller for the domain HAWAR3 could not be contacted. Ensure that the domain name is typed correctly. If the name is correct click Details for troubleshooting".

When trying to connect Windows2008R2 (already a member) it says:
"There are currently no logon servers available to service the logon request."
My guess is that is is some problem with WINS or something.

View 2 Replies View Related

Ubuntu Servers :: Email In Outlook Express Has Stopped Working?

Sep 28, 2010

i somehow managed to get squid proxy server installed.My problem is my email in outlook express has stopped working (incomming pop3 server is mail.webmail.co.za)I think i need to install a pop proxy to get this going, can someone recommend a pop proxy that is easy to configure or anything else that could resolve this.

View 9 Replies View Related

Ubuntu Servers :: New Domain Same Box Htaccess?

Sep 1, 2011

I am changing domain name for web, web is staying on same IP / ServerI want www.OLD.com to redirect (change address name in browser) to at the moment both point to same IP..am not sure why but this .htaccess is not working.

Code:
#Options +FollowSymLinks
RewriteEngine on

[code]....

View 1 Replies View Related

Ubuntu Servers :: Htaccess Won't Secure A Directory

Nov 22, 2010

I installed AWSTATS on my LAMP 10.04 LTS and followed several tutorials URL...) but I can't secure the folder, either by an alias or by .htaccess. I tried both methods manually and by using Webmin.If you go to the URL www.mywebsite/awstats/awstats.pl it shows up, which is good, but this is the default installation site and anyone who knows awstats could possibly see my stats. The conf folder is /etc/awstats/, and I did an alias for that, then .htacess, but neither worked. With the .htaccess, I would get a password promt but the full stats page was visible behind the password promt, and if you clicked "Cancel" about 20 times or so the promt would go away and the full stats page would be visible.

The actual file that powers awstats is in /usr/share/lib/cgi-bin/awstats.pl, and I also tried an Alias and .htaccess seperately and neither worked.I restarted apache2 after each change and I've searched several forums, but I still can't figure this out.

View 2 Replies View Related

Ubuntu Servers :: .htaccess File Keep Getting Deleted?

Jan 27, 2011

I am running into a very strange problem where my my .htaccess file keep getting deleted.Attempted scenarios ftp upload file.txt rename to .htaccess ftp upload .htaccess ssh - wget url/.htaccess ssh - wget url/htaccess.txt, rename to .htaccess

[Code]...

View 7 Replies View Related

Ubuntu Servers :: Unable To Check Htaccess File

Mar 10, 2010

I looked at my apache2 logs. Code:[Wed Mar 10 01:56:34 2010] [crit] [client 192.168.1.100] (13)Permission denied: /home/user/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable the server is located at /etc/apache2 the default place.

View 1 Replies View Related

Ubuntu Servers :: .htaccess-404 Error Page On Load

Jul 12, 2010

I have an existing blog that I migrated to ubuntu server recently. The site was running fine until I transfered it over to ubuntu. I get a 404 error whenever I view pages that is not my index. I believe it has to do with my .htaccess file.

I have enclosed the .htaccess and my default file taken from sites-enabled.

.htaccess
Code:
#####################
#PREVENT viewing of .htaccess file
<Files .htaccess>
order allow,deny

[Code].....

View 9 Replies View Related

Ubuntu Servers :: .htaccess For Redirect After Site Move?

Aug 10, 2010

How can I redirect my URL after a site move.I have phpBB forum software installed on a 10.04 server, and I recently moved the forums from mysite.com/forums/ to mysite.com/.

So, a thread that looked like
mysite.com/forums/viewtopic=...
now looks like

[code]...

View 2 Replies View Related

Server :: .htaccess And .htpasswd Not Working?

Feb 27, 2011

I have created a sub directory on my box on a website for my company. It is a page that has links to my tools I want to use when I do service calls. Links that connect to my servers webmin etc. Of course I don't want them found by webcrawling bots. I have created a .htpasswd file using htpasswd -c /location/to/file/.htpasswd.

This file is located outside the web. Just under the public_html folder. Then I went to the sub directory I want to protect and added a text file named .htaccess. It contains:

/home/sites/www.domain.net/tech/
AuthType Basic
AuthName "Some long name"
AuthUserFile /home/sites/www.domain.net/.htpasswd
Require valid-user
ErrorDocument errornumber /home/sites/errorpages/403.html

I also opened the httpd.conf and changed AllowedOverride to All

The error document doesn't work either.

I then restarted the httpd service. I try to access the site and it lets me right in without asking for a password. It is apache 2xxx on Centos 4.5. Webmin under Apache confifirms all this.

View 12 Replies View Related

Server :: Mod_rewrite Htaccess Not Working?

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

CentOS 5 Server :: Htaccess Not Working In 5.5

Feb 22, 2011

I have searched high and low both on this website and the big G and nothing.I have a VPS with fresh CentOS 5.5 install and can't seem to get the server to act on the htaccess file.

View 1 Replies View Related

Ubuntu Servers :: RewriteRule Works On .htaccess - But Not On Httpd.conf

Sep 29, 2010

We are trying to migrate from a centos server to ubuntu server, but we have some problems with an application called Topincs [url].

The installation is quite simple and I did it several time (but with ubuntu it's the first time).

Probably there are some parameters to set that I don't know, but even if the installation works fine and I can see the home page, the application doesn't work because RewriteRules aren't applied.

First I tried to ensure that mod_rewrite works fine and I found a weird situation: rewriterules work if they are in .htaccess but don't work if they are directly in http.conf.

View 4 Replies View Related

Fedora Servers :: Usage Of The .htaccess File?

Dec 16, 2010

Is anyone here fluent with the usage of the .htaccess file? Is it the way to go to deter search bots or is there a better method? Never mind. I already have a thread about .htaccess here.

View 1 Replies View Related

Server :: .htaccess Not Working In CentOS 5.5 X86_64

Sep 28, 2010

I have checked and double checked the .htaccess and httpd.conf to make sure everything is correct and I'm sure it is. I have AllowOverride set to All in the httpd.conf, Apache sees and is reading the .htaccess because I get a 500 Error when I put garbage text in the file. I'm lost now.

View 9 Replies View Related

Ubuntu Servers :: Logging - Record Password Attempts On Htaccess Files

Jul 22, 2010

After reading this pdf on top 5 things to log for security, ive decided to attempt this for my webserver. how i might setup some logging systems to do these tasks. Basic things i need to be able to do: Record things like password attempts on htaccess files, from what IP address, and how many attempts there were. Any useful links anyone can think of to get me started? Im a student programmer at university so any programming i should be able to cope fine.

View 2 Replies View Related

Ubuntu Networking :: Wireless Suddenly Stopped Working AND Rfkill Command Not Working

Jul 13, 2011

When originally installing 11.04 I had problems getting my Ralink 5390 wireless card to work.

Today my computer froze completely and I had to turn it off via the power switch. When I turned it back on, wireless was no longer recognized! My iPod can connect to the network just fine, so it must be an Ubuntu problem. There are no problems with my ethernet connection either.

I researched this and found several threads about blocking and unblocking wireless devices using the rfkill command. Well, unfortunately for me the rfkill command doesn't work. When I type sudo rfkill list or sudo rfkill unblock all, nothing happens; it just returns me to my bash prompt. I even tried uninstalling and reinstalling rfkill...nothing.

View 1 Replies View Related

Ubuntu Servers :: Take Apache2 Away From Root?

Feb 4, 2010

I think my apache2 is owned and running as root. I don't know if I installed it like a noob a while ago but I would like to secure it now especially since I just figured out how setup virtual hosts and I may want to eventually let people host sites on my server and I obviously don't want to have to give them root access. How can I confirm that apache2 is running as root and how do I take it away from the root user?

View 6 Replies View Related

Ubuntu Servers :: Apache2 - 98 - Address Already In Use

Aug 29, 2010

I am using Ubuntu Server 10.04 64bit. I am getting an Apache2 start up error after I setup my certificates and configure Apache2 for HTTPS. At the point on start up where I need to type in my certificate pass code I get a lockup due to the Apache2 process being in a hung state. I reboot if needed and switch to console tty2. When I type in the command.

Code:

I get the following error.

Code:

To correct the problem I do this.

Code:

From the output of the command above I look for the apache2 process and make note of its process ID. Then, I kill that process ID. For example, the command below has an apache2 process ID of 1131.

Code:

Next, when I run this command.

Code:

The apache2 server starts up and asks for my certificate password, accepts it when I type it in, and runs perfectly fine afterward.

Fortunately this instance of Ubuntu Server is running inside a VMWare virtual machine. I can just "pause" the virtual machine if I need to rather than going through this crude and tedious start up process too frequently.

Crude and tedious are feelings I'm having too frequently lately with Ubuntu Server.

View 5 Replies View Related

Ubuntu Servers :: Apache2: Php Not Parsing

Oct 18, 2010

I've reinstalled my system and installed apache. I've installed php5. 'a2enmod php5' returns with a message telling me that php5 is already enabled.

However, this code does not parse:

Code:
</php
phpinfo() ;
/>

I get a blank page. When I view the source code for the page, I see the php code.

How do I get php to work?

View 3 Replies View Related

Ubuntu Servers :: Setting Up Apache2 With SSI The *right* Way?

Jan 5, 2011

So I've got a box running 10.04LTS Server, and on it is running the latest build of Apache2.It's a home box - a server set up for the sole purpose of experimenting and having fun with. So far, the fun is mostly breaking it over SSH and then fixing it when I get home and can log into it via recovery.What I really want to do is to get this box set up with Apache2 the way it seems like it was designed - with Apache2 serving web pages from its default file location (/var/www) but also being able to log in and upload/download new web page files to that directory over SCP or SFTP. I keep hitting snags.Here's what I've done so far:

1. The server is set up in a DMZ at home and my router updates a Dynamic DNS record; so far I can SSH into it no problem.

2. Apache is working. I get my "it works!" page when I enter either the IP or the dyndns domain name.

3. SFTP is sort of working. I can log on using WinSCP and see the files and download them, but I can't upload to the default directory with my normal login.

Here's my issues: 1. I want to set up Apache *correctly*. To me, that means leaving it pointing to the default directory, but still being able to upload to that directory. I have not (and probably will not) enable the root account. I've set the permissions to 755. I've tried chown'ing the directory, but then it seems I can't view the webpages.As a workaround, I created a www folder in my default user home directory and pointed Apache2 there in the 'default' file in /etc/apache2/sites-available. The changes read as follows:

Code:
DocumentRoot /home/username/www
<Directory />
Options FollowSymLinks[code]...

That gives me a workaround for the default directory SFTP issue, but I would rather learn what I need to do to have it set up and working with default values.

2. You may notice I added Includes under the Options. My goal is to get server-side includes working. But they aren't. I have some existing webpages my work has set up - I using these as a template to use to adapt a flash movie I made to a specific resolution, as well as to learn how to optimize my flash for a webpage. Our webhost uses virtual hosting; I am not yet doing so. I'm not sure what they've done to set up the server-side includes, but the files they are using are all html files - no shtml. The include files themselves have either .htm or .html extensions. All of the pages have .html extensions.

My reading said that I need mod_include installed in Apache2. Where can I check to see that it is installed? Where do I need to add the Includes under Options?Is it in the right place? And finally, where do I need to add XBitHack on to enable it? This is the method that Apache suggests, but the documentation offers no clue as to where to put it. Most of the documentation out there refers to apache.conf, but that's the Apache 1.3 way of doing things.I really just want this to be set up according to the defaults as much as possible.I want to have a good working knowledge of Apache and of how to set it up and configure it, but dang it if it isn't a frustrating process.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved