I had a website I designed in the Yii framework. I had to move it over to a new Mac because the old one was dying. I moved everything over, but I cannot access the webpages from the browser, I get a 403 forbidden error. I CHMOD'ed the files to see if that would help, but to no avail. I cannot seem to find the answer on the Yii forums, either. Seems NO files on this site can be accessed even though file permissions are wide open. I cannot seem to find anything in htaccess or httpd that helps. Any ideas on how I tell Yii/Apache that it's ok to serve these pages?
EDIT:
So I see this in the apache2 error_log file:
Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /Users/me/Sites/website/index.php
Weird. When I uploaded the site from my old computer to the web I never got any 403s but on this mac only I get this.
Related
I am hosting multiple websites on the same server. Instead of uploading the (same) pictures for each website into individual folders, I would like to make ONE main folder on the server where all websites will get their image from, so I dont end up with duplicates.
I tried everything but cannot seem to get it working. Can anyone help me out?
Hosting on Ubuntu 16.04 with Apache2.
My host file:
Alias "/product-image" "/var/www/uploads"
<Directory /var/www/mysite.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
So basically what I want is when my SRC goes to:
mysite.com/product-image/ferrari/f1.jpg
it should be served from
/var/www/uploads/ferrari/f1.jpg
Tried multiple tutorials but nothing worked so far.
P.S. when I go to the url mysite.com/product-image I would expect to see my upload folder but I see nothing. Instead I get an error:
Not Found
The requested URL /product-image was not found on this server.
Apache/2.4.18 (Ubuntu) Server at bedrijfskledinggroothandel.nl Port 443
If you have your multiple websites set up as subdomains in your hosting (as I do), each website at run time can only see the files in or below its specific subdirectory - the hosting will put this layer of security in place.
If this is your own server, not externally hosted, the same may well apply but you may perhaps be able to override this element of the configuration (if you want to - to me, the reason for this security layer is to prevent users realising the stuff is in the same place and trying to take advantage of the fact in some way).
You could however get to what I think is your objective by putting a http (not file level) redirect in place (via .htaccess) so that the subdomain interpreted https://my-website.com/Images (or whatever) as https://www.my-main-domain.com/central-image-directory, which would do the trick I think.
At this very moment I do not have any 500 error being thrown, but in case I ever do in the future I'm trying to customize a page so users never see that awful white screen.
I am having trouble adding said page. I have the page made and a controller that loads the page, but when I try and route the page in the route file or route it using .htaccess I'm still getting that white screen.
This is what I have tried in my route file
$route['500_override'] = 'notFoundErrorPage/serverError';
and then this is what I have tried in my .htaccess
ErrorDocument 500 http://writeyourfiction.com/NotFoundErrorPage/serverError
any help would be wonderful!
CodeIgniter does not have any custom error handlers aside from 404_override, so using one for any other HTTP code will be fruitless.
Apache has custom error pages as you've already attempted, but there are a couple of things to note that may be affecting your results:
1: A local URL begins with a /
A local URL to redirect to (if the action begins with a "/").
2: Specifying in an .htaccess may require additional configuration:
It may be used in .htaccess files if AllowOverride is set to FileInfo.
If you seek additional help, either here or elsewhere, please provide more information about your server environment: operating system, web server (e.g. Apache) and version, any relevant add-ons or modifications you may have made, etc.
It depends on the server software you are using. If you are using Apache, see here: http://httpd.apache.org/docs/2.2/custom-error.html
If you aren't using apache, google "[webserver software] custom 500 page".
If you're still having trouble, try asking on serverfault.com.
I have settled my domain and my app is running perfectly on Heroku with Flask. The problem is, my hosting (that only owns the domain) points the webmail as mydomain.com/webmail. But, my application thinks this URL is proper from the script and when it tries to load it, it gives a 404 error.
I've looked around and in the CPanel forum says I should add this:
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
to the httpd.conf file, which I don't know where to locate. Is there any way around this?
I migrated my website from one server to another. I am able to visit the home page on main website(eyaas.com), but other then that no links are working, not even the admin
Strangely, the indian version website(eyaas.com/in) is running fine with all links working properly.
When i migrated, I was seeing a 500 error so the hosting provider asked me to delete the .htaccess file which was auto-created simultaneously. Then the site worked but now this problem has arised.
What should i do. When replace the .htaccess file with the earlier one, I get a 500 server error.
The .hatccess file is necessary for the rewrites. Speak with your hosts and make sure that it is configured properly for Magento.
Currently I am struggling with the categories and products showing 404 errors when I navigate away from the working home page.
I was able to install Magento and I am using a copy of an existing working site. The purpose is to use this new site as my dev sandbox. I am using Magento 1.11. This is also a multiple store site.
Things I have tried:
Reindex the Catalog URL Rewrite, this unfortunately never completes.
To try and solve this I have deleted all the lock files and then I have also deleted all the entries in the core_url_rewrite table.
I have also changed the Base URL in the core_config_data table to my new URL.
Thank you in advance!
Just like Fiasco Labs said, you probably turned on URL Rewriting:
System -> Configuration -> General -> Web -> Search Engine Optimizations -> Use Server Rewrites but don't have mod_rewrite Installed/Enabled.
Either Install/Enable it on your host, or just turn the server rewrites off.
Another reason, if you HAVE mod_rewrite Installed/Enabled, you might be missing .htaccess file in your Magento root.
even with mod_rewrite enabled, the error can be a misconfiguration of apache. Have a look at etc/httpd/conf/httpd.conf file. Find the part where is defined (standard Apache config dir). You should find:
AllowOverride All
If there is a
AllowOverride None
Change it to All and the magic happens. Then restart Apache with:
sudo service httpd restart