Could not access your domain - moodle

when I try to install moodle via softaculous, I get an error like this, I just created my domain name and the files seem empty. Can you help?
Eror:
Could not access your domain. Please make sure your domain is pointing to this server and there is no .htaccess file restricting access to your domain
I get the error while loading Moodle, the contents of my files are empty and .there is no htaccess file

Related

How to prevent access to the Hidden Directories like Scripts, Contents, aspnet_client from browser in a asp.net mvc application?

I want to prevent the user from accessing the Hidden Directories like Scripts, Contents, aspnet_client directly from the browser in a asp.net mvc 2 application. Currently whenever I try to access the above mentioned Hidden Directories it is returning the following error message:
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
I want to show "404 Not Found" error page whenever one tries to access the above mentioned hidden directories.
Can anyone help me with to resolve this issue?
When attacker try to access the file with some random name, if given file name not exists then it will give error like "404 File not exists". if file name exists but don't have access to file then it will return error like "403 Forbidden" error. so attacker get idea of the file and file directory.
So the application should be capable of handling this issue
Solution is to show the return response in different way, recommended to show as 404 error.
To do this in IIS we can add customerError configuration in the web.config file.
Please check the below article for the details of issue and solution.
https://www.c-sharpcorner.com/UploadFile/092589/custom-error-page-in-Asp-Net/
You may want to add custom handler - something like this - http://forums.asp.net/post/4152906.aspx

how to fix moodle installation Dataroot security error

I'm trying to install Moodle 2 on a localhost server and I'm having trouble making the moodledata directory secure
error msg say
Dataroot location is not secure
The dataroot folder has to be outside the web folder.
So if you have something like /var/www/yourmoodlesite
Then dataroot should something like /var/sitedata

SugarCRM error on module loader on shared hosting

I’ve a shared hosting account and installed SugarCRM. Everything is fine except the message i get for the module loader. Here i get the message to add suhosin.executor.include.whitelist = “upload://” to the php.ini file.
The message is:
Upload stream is blocked by Suhosin, please add "upload" to
suhosin.executor.include.whitelist (See sugarcrm.log for more
information)
Because i have a shared hosting account i don’t have access to my etc map and therefore also not to my php.ini file.
I want to use the .htaccess file for this but don't know exact code. Can anyone help me?
You Can Try Add this to your .htaccess file as suggested in http://forums.sugarcrm.com/f6/upload-stream-blocked-suhosin-82116/
<IfModule mod_php.c>
php_value suhosin.executor.include.whitelist upload://
</IfModule>
In my case I'm using php-fpm so I modified the php.ini locater in /etc/php5/fpm/conf.d/suhosin.ini and I have no more warnings from SugarCRM
; configuration for php suhosin module
extension=suhosin.so
suhosin.executor.include.whitelist="phar"
suhosin.executor.include.whitelist="upload"
The solution posted by Carlos Quijano didn't work for me.
I've found that the solution is different depending if PHP is run as module, CGI or FASTCGI .
This is the documentation I've found about the different methods you can use to use a custom php.ini file for your domain (or even subdomains)
First you should check which one is your case.
For this, you can use the phpinfo command:
Create a php file called phpinfo.php with this content: <?php phpinfo(); ?>
and upload it into your domain root, then visit www.yourdomain.com/phpinfo.php,
you'll see a table and next to "Server API" you'll see which way PHP is run.
For me it was "CGI/FastCGI", so I had to get a copy of the global php.ini, which I didn't know how to get since it was not accessible by FTP access. I've found a solution in a Drupal forum:
Create a php file you can call gettheini.php with this content:
<?php system("cp /usr/local/php5/lib/php.ini /home/YOURCPANELUSERNAME/php.ini"); ?>
*The first path must be the path next to "Configuration File (php.ini) Path" in the table obtained before (phpinfo.php), with php.ini at the end. The second path is the path where you want to copy it to.
Upload it into your domain root, then visit www.yourdomain.com/gettheini.php.
This command will copy the global php.ini file yo the path you specified.
Then you can edit that file adding
; configuration for php suhosin module
extension=suhosin.so
suhosin.executor.include.whitelist="phar"
suhosin.executor.include.whitelist="upload"
save it and upload it.
As my hosting service had made some arrangements php.ini overriding, when I checked again the phpinfo page, the new file was already working (check next to "Loaded Configuration File").
Don't forget to protect the new file, add
<Files php.ini>
order allow,deny
deny from all
</Files>
to the end of yout .htaccess file (in the same root folder of your domain or subdomain)
I hope my experience can help you to solve your problem or at least give you some guidance.

Setting moodle online

Good day everyone, I have been trying to put my moodle online so pcs from internet can access it, but until now, no luck at all. (Im using moodle 2.3.2 on Windows Server 2008 and IIS 7).
I tried to configure the moodle file config.php, setting the directive $CFG -> wwwroot = "my-public-ip/moodle". Then, when I access to moodel from the server, I can access it by "http://my-public-ip/moodle", when I try to access via localhost, it sends an error which it is OK.
But the funny part comes when I try to access the server from an outside pc. When I type "http://my-public-ip/moodle" it simply cant "see" the configuration I made to the config.php file (it says: This server cna only be accessed via localhost/moodle) it looks like the outside pcs are either ignoring it, or searching for another configuration file. I dont know what the hell is happening, this is very odd.
Any ideas?? tnx!!!
Change the following file:
lib-->setuplib.php
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 3);
for
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 0);
I realise this is an old question, but it's also worth pointing out you may need to also run the database search and replace script, at:
http://my-public-ip/moodle/admin/tool/replace/index.php
as referenced in Method 2 here.
This is required if you change the name of the site once you have installed it. If you were already using Moodle under "localhost", then there will be a number of references to the old localhost address stored in the database that need to be updated to the new IP-based address.
It might be because the http:// part is missing?
$CFG->wwwroot = "my-public-ip/moodle"
should be
$CFG->wwwroot = "http://my-public-ip/moodle"

"URL not found" error at my localhost setup of TYPO3 website.

I have setup TYPO3 successfully on my local server. But I am having problem when clicking on any menu item: It's showing "url not found on server".
When I type in the URL manually into the browser it shows the page. It's only having problems when redirecting after clicking on a page item at any frontend website page.
That might be related to the domain config or RealURL... or both ;)
Do you use RealURL? Or do you use the standard url config?
If links to sub pages look like index.php?id=12345 you are using the standard config.
My guess is that the local DNS ("hosts file") is not configured correctly.
With the hosts file you can simulate how the web site will appear when it's online, hooked up to a "real/global" DNS. (Not quite, but in a nutshell)
So if you set up Typo3 to be reached under http://www.example.com/ you need to tell your local DNS ("hosts file") to route a request to http://www.example.com/ to your local host e.g. http://127.0.0.1/ . In that case your host file needs an entry like so:
127.0.0.1 http://www.example.com/
What Domain do you enter to reach your web site? Where do the links from the menu link to?
If you wanna know mor about the "hosts file" look here:
http://accs-net.com/hosts/how_to_use_hosts.html
If you can log in into the TYPO3 backend (/typo3/) and can access the frondend through /index.php, but not through the generated menu links, then RewriteRules for mod_rewrite don't apply.
Usually TYPO3's installer should detect this configuration and disable RealURL, which is responsible for generating such nice looking URLs (instead of index.php?id=123). It seems like this failed (or you copied everything afterwards without the .htaccess file?).
Make sure that you have TYPO3's .htaccess file in place in the root directory of your installation. If this is the case, make sure that mod_rewrite is enabled in your Apache config.