Fail when I try to open the website - http-status-code-404

The last time I asked a question here, it was fixed very quickly. How can I fix this error? http://wiegexd165.165.axc.nl

Has it ever worked or is this your first time testing this site? If it's never worked and it's a new site, check your Apache config for paths. Are they correct? Maybe try absolute paths. Do you have the directory set to Deny from all?
If the site worked but is failing now, what could have changed recently that could have caused it to fail?

Related

google search console error indexing a not-ever-created page

google search console indexes a few URLs that I haven't created. These routes never existed and the following checkups have been done:
robot.txt works well;
No hackers messed with the website;
browsing results in the website's 404 error.
I'm using the console's removal tool but I'm searching for a better solution that needs less manual handling of things.
Thanks for the answears.
By index I presume they are reported under coverage as excluded?
If they 404 and are excluded, you don't need to use the removal tool. They are effectively removed already.
Google is just reporting that for some reason they found the URL, and then are telling you they know it should not be indexed.
They most likely found the URL due to a link to it. Maybe a typo for a link, or even a link from years ago. If it looks like a mistake you could try and fix the link and/or set up a 301 redirect from the bad URL to the right one.
Otherwise, it is fine to ignore reported 404s.

Installation must be finished from the original IP address, sorry - Moodle

I'm trying to install moodle on AWS ec2 and the database is local on ec2 instance and now I'm stuck at error "Installation must be finished from the original IP address, sorry." I have tried all possible solutions on the web but nothing worked for me.
Just comment out these 3 lines and reload:
if ($adminuser->lastip !== getremoteaddr()) {
print_error('installhijacked', 'admin');
}
https://github.com/moodle/moodle/blob/master/admin/index.php#L753-L755
With all due respect, commenting out core Moodle code is not a good idea, especially when there is an easy and safe work around the problem.
When it comes to AWS EC2, commenting out the code may get you past that point in the installation however, the Moodle getremoteaddr() function, which is used everywhere in Moodle, will continue to report an incorrect IP address in things like logs and may even affect the security of your website.
A better approach is to simply add the following line to your Moodle main config.php found in the webroot. It should be placed anywhere between the $CFG = new stdClass(); and require_once(__DIR__ . '/lib/setup.php'); lines:
$CFG->getremoteaddrconf = 0;
This will need to be added anytime up to when you get the error message.
While I have not tried it myself, you may alternatively be able to add the following line to a file called /local/defaults.php (create if it does not already exist):
$defaults['moodle']['getremoteaddrconf'] = 0; // New default for $CFG->getremoteaddrconf.
For more information on defaults.php, see https://docs.moodle.org/dev/Local_plugins#Customised_site_defaults
This defaults.php file can be useful for setting default settings during a new installation if you include it in your Moodle fork.
Hope you find this information helpful.
Best regards,
Michael Milette

Found malcode in my webserver apache2

can someone pls tell me how bad the found malcode in one of my webserver is ?
I found it in public_html/outlet.
here is the code pastebin
i deleted the directory and try now to search my logs.
thanks for your answer
tango2000
It isn't evident how bad it is. However, the real bad part is that they were able to inject code into your server.
Since you don't know how did they do it, it doesn't matter that you deleted the folder that contained the script. The vulnerability is still there and they will hack you again eventually.

CakePHP from localhost to remote server - blank page

i am trying to figure this out for a long time now, but so far no luck, maybe somebody can help me.
I have a 2.2.2 cakephp installed on my computer (localhost) and everything works perfectly. But now i want that same project to be online on remote server. I upload everything, set mysql path but i get a blank page when trying to access the site.
If i upload a fresh cakephp it works, but my project doesnt. The debug is set to default, think that should be 2? I also deleted files in cache/tmp, but still no errors or anything, just blank page.
Any info would be helpful, thank you.
I hate when that happens :). Usually it does if there is an error somewhere and you can't see it because the errors are turned off, so you should call phpinfo() and see if display_errors is on. Changing the debug mode doesn't work every time since display_errors is set from php.ini.
Unfortunately, if this is the problem and you don't have access to edit the php.ini file, you might need to ask the hosting provider to change it and restart the php service.
You can also try this: error_reporting(E_ALL)
I uploaded changes to my cakephp website and discovered that all actions for a particular controller returned a blank page. I discovered what the error was and was able to reproduce it with another controller.
The problem was that in the first line of my controller file I had a space before the opening php tag.
One space cost me hours.
Just uploading all files won't cut it. Make sure you work through this checklist:
First and foremost, check the error log file located under app/tmp/logs/error.log, this usually holds some very good pointers as to what is wrong.
Make sure you have uploaded the app/Config/database.php file with the proper details. Local installs usually have user root without password. Online servers (obviously) do not!
To that extent, also make sure you actually have a database with your hosting provider (either your host sent you the info or you need to create it yourself using their control panel).
Make sure you also uploaded all .htaccess files (the one under the root directory and /app and /app/webroot), some FTP programs don't show this "hidden" file by default.
If all else fails, contact your hosting provider for further support as they usually have access to more verbose server logs that can also hold clues.
The real problem was only the coding I used in notepad++. All my files were encoded with UTF-8, but they should have been UTF-8 without BOM. After I changed it to UTF-8 withot BOM, everything started to work perfectly.

Error when debug is 0, no error if higher

I'm in the process of standing up a new CakePHP project with some very simple boilerplate code. In the process of helping a co-working install the code, I realized that if my debug value is 0, I get a 404 error (just loading the homepage):
Error: The requested address '/' was not found on this server.
If I flip the debug value to 1 or 2, the error goes away and the default homepage (I don't have any custom layout/page created yet) loads happily. This isn't an ajax request and there's nothing fancy going on here. Anyone seen this before? Haven't found anything via Google that matches what I'm seeing.
Thanks.
UPDATE
And, just in case anyone is thinking the obvious, my homepage (/) route is configured. Like most everything else, my routes.php file hasn't been modified yet.
Oh, my. Talk about a punitive headslap moment: https://stackoverflow.com/a/3803076/1665
What a long week. I'll mark this answered as soon as the time limit expires. Sheesh...
Try deleting tmp files located at /app/tmp/cache/.
I found solution to similar problem here:
http://cakephp.1045679.n5.nabble.com/Re-Not-found-error-with-DEBUG-0-td1257613.html

Resources