Shopware 6 Staging shows 403 forbidden - staging

I tried to set up a staging of a running Shopware 6 instance.
While I did as the doc of Shopware told, I get a 403 forbidden when I visit the staging like https://staging.xx.de/ I get an 403 error.
The error log says as follows:
Cannot serve directory /home/user/xx/staging/public/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
I copied the .htaccess btw.

As the error log states that there could no matching directory index be found, I reckon you pointed your subdomain to the wrong directory. Please make sure you copied Shopware to a subdirectory and your subdomain points to xx.de/{staging}/public/ and that you properly copied any index file to this this directory.

Related

404 on Openshift URL, URL fine on dev

I have a website that I am developing locally and pushing to RH Openshift with a PHP-5.4 and MySQL cartridge.
Most URL's work, but I am having an issue with some page URL's being recognised locally, but returning a 404 on Openshift.
Example: on development the following URL works: local.development.local/public/reset.php but visiting the Openshift url: example.rhcloud.com/public/reset.php returns a 404. However, example.rhcloud.com/reset.php works, even though reset.php is within the public folder directory.
The folder structure is the exact same on development as it is within Openshift repo folder.
Is there a specific setting I need to set in my Openshift environment to get it to recognize the URL?
The problem was due to the directory structure I had given my website. Since I had placed the majority of my code within a folder named public, Openshift was using that as the DocumentRoot. This wasn't my required functionality, so I renamed the folder to app, updated my URL's and this resolved the issue. Blog post giving the Openshift DocumentRoot logic can be found here: https://blog.openshift.com/openshift-online-march-2014-release-blog/

Rails production: Directory index forbidden by Options directive

I'm working on deploying my rails app using apache and passenger on a virtual server that I'm managing via Virtualmin. All of this is being hosted on an Ubuntu 12.04 VPS.
Anyway, I'm getting the following error.
Forbidden
You don't have permission to access / on this server.
At first, when this occurred, I was getting the error:
Premature end of script headers
in my virtual host error log and a key error in my apache error log. Both of these went away though once I updated my config/secrets.yml file. The 403 error, however has remained. Additionally, the virtual server error log had the error:
Directory index forbidden by Options directive
Additionally I've made sure that my public_html directory (and all of is subdirectories) is the right user for apache. I've checked the production error log, and apache error log and haven't seen anything come out when I load the page.
Any ideas as to what I should try?
Many thanks in advance

Where are saved logs about Rails app in production if error 500?

I installed a Rails app on the DigitalOcean server, but instead of seeing the app itself, there's the error 500 page.
When I check the directory "logs", there are no data written in the production.log file, or in the unicorn.log.
So, how can I find out what's wrong?
You could try look for nginx's logs in:
/var/log/nginx
usually are placed there:
access.log and error.log

Rails error "jquery.js isn't in paths .... "

I'm trying out a Q&A application written in rails 3.1 on my Ubuntu system. After I run the server (rails server), and enter the localhost:3000 url in the browser, I'm getting the following error:
/var/lib/gems/1.8/gems/jquery-rails-1.0.14/vendor/assets/javascripts/jquery.js isn't in paths:
(...."displays a list of paths including /$home/myapp/jquery-rails/ruby/1.9.1/gems/jquery-rails-1.0.14/vendor/assets/javascripts".....).
I did bundle update and it installed the jquery.js and all other .js files in that last path. But I'm still getting the same error. Any suggestions about what I might be doing wrong here?
P.S. When I enter the URL localhost:3000, it actually tries to open the URL: http://localhost:3000/session/new. Must be some application specific logic.
Remove everything in your /tmp directory and restart the Rails app.
Fixes it for me.

Ruby error on non-ruby site

A friends of mine have a shared hosting with many sites hosted. There is ruby on rails, php, xslt/xml sites using mysql or postgress. Today one of the xslt sites displays this error:
Passenger error #2
An error occurred while trying to access '..../config/environment.rb': Cannot stat '..../config/environment.rb': Permission denied (13)
Apache doesn't have read permissions to that file. Please fix the relevant file permissions.
This is, as I Know, a ruby error (*.rb), but there is no ruby app here! And no any config/ catalogue.
The error log says:
(13)Permission denied: /home/..../.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
The .htaccess file in the htdocs directory is present and have 777 permission for now.
I haven't any idea what does it mean.
I experienced the same problem, Passenger error #2, suddenly and without correlation to any configuration change on my part. I did not add Ruby. I contacted host monster tech support, their level 2 support was baffled.
Confirming that Jaap Haagmans' solution; overriding PassengerEnabled with no from the .htaccess located in public_html works. Thank you kindly Mr.Haagmans.
I think the configuration of either your apache or nginx state that passenger is enabled. Check for a "passenger_enabled on" on nginx or "PassengerEnabled on" on apache in your webserver configuration file. Then disable it on top level or in the virtual host that runs a php website.
You could instead try to put "PassengerEnabled on" in a .htaccess file in the public_html folder (or equivalent, e.g. httpdocs). Also, make sure the .htaccess file is readable (e.g. 644 permissions in Linux), as that's what the error in your error log is saying.
Looks like there are some leaks in the web host's configuration. Passenger (which is like a mod_rails apache extension) is looking to load a particular Rails app's configuration, presumably not yours. If you're doing something important (like an e-commerce site) I'd run far away from the hosting company. Otherwise you'll have to get this resolved through them.

Resources