Why won't MAMP let me chage the root folder to something other than default. I get secure connect failed - security

I have been trying for around a year off and on to use my mac as a development webserver. I keep running into roughly the same problem no matter what platform I use. I've currently installed MAMP however when I set my root directory to my web page I keep getting security issues from whatever browser I'm using. The default root of MAMP works, no problem but when I change it to what I want I get: Secure Connection Failed. Using the MAMP default if there's an http prefix it's just http but when I set my own root the prefix is https://. The "Problem Loading Page" page doesn't give me an option to add a security exception. This is beyond my pitiful brain level to figure out, so I'm hoping much smarter people than me can help me understand what's going on. I guess I could just move my web site to the MAMP default folder but that seems like cheating...

I figured it out, finally. I kept changing the Document Root to directories leading up to httpdocs. Each worked when loading the page until I arrived at the httpdocs directory, at which time I got the security exception and problem loading page. I removed this redirect from .htaccess in htttpdocs -
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This fixed the security exception.

Related

Can't access files on Magento root

I am looking to install an SSL on my domain name and in order to do so I need to upload a .htm file to the root and access it via the browser, but when I do so, I keep getting a 404 error - this is with any .html page on the root - nothin shows up.
I have edited my htaccess file as well as deleting it all together and still no luck.
The file i'm trying to reach is: http://www.elmershardware.co.uk/xtt5ughh.htm
If someone could help point me in the right direction of fixing this I'd be really appreciative
Thanks
G
I think there is nothing to do with .htaccess. It's something related with your apache conf.
In your apache configuration file check if in DirectoryIndex appears
index.htm as a entry, add it if it doesn't appears and restart apache. Then , try again

New Apache Server - Trouble with .htaccess

(Pardon me, I've injured my right hand so I'll have trouble typing)
I've recently set up a new Linux server running off the 'LAMP Stack'. I used PuTTY, Git and friends. Usually, I work in a pre-set up environment - I'm just an app developer. This would technically count as my first 'solo venture'. I've never been given root access to a server before, I was just there to work.
So, to get started, I decided to port some of my work from a previous project and build off of that. It relies heavily on Rewrite Rules. Ignorantly, I assumed my .htaccess file would magically work. It doesn't - For whatever reason, Apache wants you to enable the use of rewrite rules (It's not like you'd accidentally set up an .htaccess file, dear me).
So, I've read various tutorials, followed guides, asked elsewhere - I'm not really getting anywhere. To finally get to the point, here's what I've done:
1. I enable the use of .htaccess files at /etc/apache2/sites-available/default-ssl.conf:
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
2. I create an .htaccess file at var/www/html/site:
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/site/index.php [L]
3. Now, you should be able to reach a URL located at http://www.example.com/site/index.php/Bool via http://www.example.com/Bool (Bool is something like a query string - A page identifier). You can't in this case - You're told that there's no file titled 'Bool' on the server.
The rewrite rules given in section 2 have worked before, but don't work here.
Some guides also tell you to do wacky stuff like set up some password system at /etc/htaccess/.htpasswd and have another .htaccess file to call on that or something. Despite my other rewrite rules not working in this new server environment, the 'password' system did actually work (I was asked to provide a password before accessing a page) - However, I don't need or want any restricted access pages like that.
Practically everything I've tried has not worked - And that's ranged from changing the path in the <Directory> tag within default-ssl.conf to putting .htaccess files here and there, with and without password systems, different 'code' in the .htaccess/configuration files, and more. Practically every 'guide' provides you with a different solution, including and excluding details and steps others do/don't.
I've even attempted changing AllowOverride to All in /etc/apache2/apache2.conf to no success - Just an Internal Server Error.
The grand question: How do you enable the use of .htaccess files anywhere you need them? Somebody has to be using a correct configuration somewhere, so you happen to have that working on your server, I'd like to see what you did.
I'm very excited to be in charge of my own server, it's been a wonderful learning experience and surprisingly, the learning curve hasn't been too difficult. I hope I can get this app running on it properly.
If Unfortunately Your HtAccess File are not being read by your server even in any case then you can use this command in order to enable the htaccess accessibity onto your server.
TO ENABLE HTACCESS FILE ON RACKSPACE SERVER(Debian Os)
sudo a2enmod rewrite
and restart the apache server now it will be accessible.
Thanks
Raghwendra Pathak

Unable to enable Clean URLs in drupal 7 website after migration

Recently, I migrated my website from local machine to server machine. The website URL is http://www.example.com/myweb
I noticed that only front page is visible and other pages are showing 404 error.
After reading this answer, I got to know that this is happening because of clean URL module. I enabled RewriteBase myweb in .htaccess file but It doesn't work out. Finally I thought of disabling Clean URL temporary as told here. This works well.
Now I wanted to enabled it again. It is showing following error-
Clean URLs cannot be enabled.
Below is the screenshot-
I can see some directory permissions error in status report at admin/reports/status. Are these related to each other?
You need to change your Apache server setting on new server.
Enable 'LoadModule rewrite_module modules/mod_rewrite.so' line in httpd.conf file on your server and restart server
Check if .htaccess works and also check if you have AllowOverrides All in your virtualHost config in Apache.

.htaccess redirect to subdirectory on Verio windows server

I've been trying to get a website up an running on my work's servers using Verio windows server 2003 gold and they've been quite useless when it comes to helping me out.
All I'm trying to do is set up a Wordpress installation, which they apparently require to be in a subdirectory. This is done and I have it in domain.com/wp ready to go. At this point they recommend that I use an .htaccess file to redirect to that url, so as they just sent me basically an "About .htaccess" link, that was of no help.
Did some searching, found a couple options like this one:
http://www.site5.com/blog/apache/htaccess/redirect-to-blog/20090427/
and nothing I use seems to work, not even as a straight redirect. Just gives me a "Directory Listing Denied - This Virtual Directory does not allow contents to be listed."
I do want to mention I did enable URL Rewrite for IIS via ISAPI_Rewrite 3 in the control panel.
As I mentioned Verio support is useless and I can't seem to find anything searching that seems to help my situation.
So pretty much what I need is domain.com/wp to rewrite as domain.com so all links centered around it do the same (ie domain.com/about domain.com/contact)
Any help? Thanks
If I understand you correct you need your Wordpress application to be available from the root of your web site instead of /wp/ folder? Then please try following .htaccess:
RewriteEngine on
RewriteRule ^(?!wp/)(.*) /wp/$1 [NC]
By the way I think you could try simply copying /wp/ folder content to the root folder.

yii, Development and URL issues

We have our server which runs the site at 173......54/
For development we want to have a copy of the code that can be tested at 173.....54/~me/site
When I install a copy of Yii and the code at ~me/ folder and access 173.....54/~me/site I am able
to see the newly installed index html. However, if I try to move to 173.....54/~me/site/book or a user register page or any other page the other (main) Yii application reads the code as a link not found instead of the development Yii application.
Am I supposed to update a the htaccess file to ignore requests within /~me ? If so how should it look? Or am I missing something?
Thanks again!
No need to make ignore in other .htaccess, the dev site .htaccess will take care of it.
In your index.php at the root of your dev site you need to point $yii at your Yii framework/yii.php
and then in the .htaccess in the root of your dev site you need to point RewriteBase to your dev site root.
Also make sure you point to the correct configuration file corresponding with your application in index.php

Resources