OpenShift PHP Image Asset Giving 500 Error - openshift

I have deployed a PHP website do an OpenShift PHP 5.4 Cartridge. The application loads just fine, CSS, JS, etc. but images do not load correctly. The images exist in the git repo which is being pushed to OpenShift just fine but when I attempt to access an image, say from http://someopenshiftapp/images/logo.jpg it fails with a 500 error.
The server log gives me:
/app-root/runtime/repo/images/.htaccess: Invalid command 'IndexIgnore', perhaps misspelled or defined by a module not included in the server configuration
I am trying to resolve this issue but so far google has not been able to help me. I tried editing the httpd.conf to include the module but that is a read only file. I may have to create a new cartridge from scratch? How do I serve images with OpenShift?

I don't know the exact reasons why Apache was behaving like this but it was. There was a robots.txt file disallowing all user agents in the image directory that another developer had added. This was causing the Apache installation to give a 500 error when attempting to access resources within the images sub-directory. If anyone has any further explanation I am willing to listen but for now this mystery is solved.
I may test this exact case in a stand alone Apache environment unrelated to OpenShift and attempt to reproduce this error. :) Happy Coding.

Related

first path segment in URL cannot contain colon error in gitrunner register

I have tried various ways which is available on stack overflow but not single one works .i was getting error everytime whenever i tried to register my gitlab runner everytime please provide descriptive answer
error: first path segment in URL cannot contain colon error
Since you did not provide a description of your setup, it is hard to pin down the problem. I'm also not an expert on GitLab and I just recently started tinkering around with my own local GitLab instance installed via Docker.
For me I wanted to connect a GitLab-Runner to my GitLab in the local network. That's where I tumbled upon the error you are mentioning. I am using a different port for the GitLab server, which was neccessary because some other services are already using the default ports. The solution for me was to add the prefix http:// in front of the ip. After that, the registration went flawlessly.
So instead of writing for example
123.456.789.XXX:YYYY
I had to write
http://123.456.789.XXX:YYYY
Of course the ip can be different according to your network.
If you provide more information, it would be easier to solve your problem.
And in case you solved it on your own, feel free to share your solution.

404 on an existing file

Recently I was trying to run an completed website on a hosting of my client. On my hosting, wedos.net, everything works properly, so does when running on my localhost. But on this particuluar hosting (Forpsi.com), lot of things act strange.
The thing that I found most annoying, is that server returns 404 Error on a files that exist - but only for *.svg, *.otf, *.woff files etc..
*.php, *.html, *.css,... Each one of these work properly. Not sure where is the issue.
According to this problem, my fonts won't load, neither do my svg files.
Any ideas?
Sounds like your host has a blacklist of extensions, you should ask them if they got any filters in Apache Module mod_access
You can host these elsewhere if you can't resolve it in this server

Hosting basic html site on iis

I have a basic web site (just html, js and css files) that I want to host on IIS on my local machine for testing purposes. The site runs fine when I run it directly as a file on my computer. I added a website on IIS, using the directory these files are located in, but when I try to launch it, I get an error page that says:
An error occurred loading a configuration file: Failed to start monitoring changes to '[my site path]' because access is denied.
It then says that the source file is a web.config. I know that ASP.NET sites use a web.config, but I don't even have one, and I just want to run a basic site using html, css, and javascript.
Any ideas on what the fix might be? I made sure I have an application pool for the site.
You likely put it into your user profile -- ie c:\users\skitterm\ -- which won't let the process running IIS read the folder. You are better off using IIS' built in directory structure in c:\inetpub and adding a folder for your site.
As you can tell this is a server misconfiguration. It would help to know the version of your IIS.
You can follow the steps on Microsoft's official knowledgebase to resolve the issue:
http://support.microsoft.com/kb/316721
http://support.microsoft.com/kb/317955 (for IIS v6.0, try Method 3)
I worked in IIS about a year ago and such errors are caused by misconfigured Security settings in IIS.
Sounds like you need to set up the proper access rights for the folder to the account specified by the application pool identity.
First make sure that your folder is not anywhere under your \users\, \program files\, or any other place that already has restricted access. Put it under a folder on the root (\inetpub is a good place).
Then, add the appropriate permissions (usually read only) for the folder to allow the user account specified by the app pool identity to access it. If the app pool identity is set to ApplicationPoolIdentity, adding the IIS_IUSRS local group should do it. Otherwise, use the account that is specified.
This should fix the problem.

Windows Server 2012 IIS Issues

Let me first say I soley beleive IIS is usless because I have never gotten it to work ever, no matter what I do it never lets me access the website.
Before I start let me establish I have no choice but to use IIS in this instance and I really need this to work.
Let me also establish the following:
Yes I have tried turning it off and on again
There is 0 (NONE) firewall on this machine, and yes the server is entirely updated
My question is, whenever I try to create a website, for example the port im launching a server on is on port 3606.
I am attempting to have my website come up on port 3606, and direct me into a folder that is located at c:\mysqlservices
Now! Inside this folder is phpmyadmin source files, and in a desperate attempt to get this to work I have made the permissions to where EVERYONE, IUSR and IIS_USR all have full read write and nuking permisisons to this directory, its files, and all of its subdirectories.
Now, When I go to this address, for example, panel.archservers.com:3606,
All I get is the issue "403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied."
Thank you in advance for the help, all I need is to get this IIS server to actually work, because as it is, I cannot do anything with this IIS server..
Thank you very much in advance
This link suggest to add "IIS_IUSRS" user, which is not the same as "IIS_USR".
I needed to install the PHP core, then reset my permissions back to just iis_usrs.
It worked great
you are entering a wrong context...give a correct context of your application it will open that page..
Ex:
www.example.com - Forbidden Error
www.example.com/ex.jsp - Displays the respected page
Also check proper permissions are supplied or not to the directories

Aptana not copying files to external server

I just set up Aptana and have configured the Apache testing server in the folder C:\Apache\htdocs. When I try to test a simple HTML file I am directed to localhost/myproject/myfile.html but I get a 404 error. Upon inspecting the folder I find it empty. If I put a file in that folder the external server displays it just fine, but Aptana is not loading the files on the testing server when I attempt to run them. Any ideas? I know it's something simple, but I can't seem to figure out the problem.
Thanks,
Rob
The solution I discovered for this seems like a workaround but may be the only way to perform the task. I simply set up the localhost server just as if I was publishing the site to a remote location. Of course, the files don't update automatically when viewed like Dreamweaver does, but it works.
I discovered the best solution to this problem. I discovered I needed to install an FTP server on the local machine. I installed and configured Filezilla server and voila - problem solved. The only tip I'd add is to make sure to set the permissions properly for the folder or you'll run into errors.