Getting a 'Not Found' error on my website? - ftp

I'm trying to upload files to my domain that I'm hosting with Dreamhost. I connected to the server with FileZilla and I'm pretty sure I put the files in the right spot.
Their tutorial says to create a directory with your domain name like this: 'mydomain.com' and put your files in there. I put an index.html, p.css, register.php, login.php, and logout.php file in there. However, when I navigate to mydomain.com in Google Chrome, all I see is this:
Does anybody know what could be causing this?
BTW I didn't actually create a directory called "mydomain.com" I used the domain I own.
UPDATE:
The directories are set up like this:
/
mydomain.com
public_html
register.php
main.css
logout.php
login.php
index.html

Can you make sure you have group read permissions on the file you are attempting to fetch?
You want permission each file has a 755 permission, here is how you would change a file permission in FileZilla.
Also, make sure everything is in the public_html file.
public_html/index.html
public_html/p.css
public_html/register.php
public_html/login.php
public_html/logout.php

Try adding a file named .htaccess to your public_html directory. In this file, put the following line:
DirectoryIndex index.html
Assuming the webserver is Apache (or a work-alike) this tells the server to send index.html whenever someone asks for /.

I finally figured it out. For some reason it wasn't working when the directory was labeled mydomain.com. I changed it to mydomain_com and it fixed it for whatever reason. Thank you to cevaris and Amazed for helping me.

Related

Install Laravel on dedicated server's subfolder

So I am having an issue with pushing a Laravel app to production on a dedicated server's subfolder.
Server is run on Apache.
Url I want to push my app would be subdomain.domain.com/project
The structure of my dedicated server is
.cpanel
...
-laravel
-app
-vendor
-...
-public_ftp
-public_html
-folder
-contents of laravels public directory
-ssl
I know that in order not to expose my hidden files I am required to install it in a root directory, but this is not an option because I will be having multiple projects running under subdomain.domain.com/project-1, subdomain.domain.com/project-2 and etc... and all will have a separate laravel installation.
I need a hand in order to achieve that, can anyone give me some advice?
Managed to do it myself, the problem was when i was creating a symlink, so instead i just moved contents of my public directory to public_html/project-1/ and changed index.php path to /../../laravel/
The thing was that I have done it originally but I didnt expect that permissions for storage need to be manually set, that solved my issue and laravel works.
ALWAYS CHECK ERROR LOGS :)
You can place your separate folders in your subdomain with no problem.
The important thing is that you need to point the browser to public/ folder under your laravel projects.
You can create a .htaccess file with the command below in root folder of each project and perform a redirect.
Place the following command in your .htaccess file:
RedirectMatch ^/$ /public/

Make symlink laravel public folder

i've tried push my laravel 5.1 project to server. I want to make a symlink to public_html folder so i can access it like normal.
ln -sv app/crowd/public public_html
i've tried that one. but the symlink is taking the public folder instead of it's content.
ln -sv ~/app/crowd/public ~/public_html
i've tried that one too but it still fail.
any suggestion how to make it works?
If "the symlink is taking the public folder instead of it's content" means that your browser is giving a 403 or saying you can't access the folder, it may mean that you don't have index.php in your DirectoryIndex directive (if you're using Apache - not sure what the equivalent is on nginx).
When you enter a location in your browser and don't include a filename (www.host.com/page.html), the server looks at a list of default pages and sees if one of those is present. If not, it tries to serve the whole directory. Try browsing to www.host.com/index.php and see what you get. If it loads, you just need to update your config. If not, please explain what you see.

public_html folder invisible

I have a website which I copied to this location. The public_html folder was also uploaded with the other folders but it is not showing up. Please guide me. Thanks.
As you are using DreamHost web hosting you wont have any control over ssh and chmod , chown commands. I think dreamhost wont use cPanel for shared hosting, they have their own control panel, so there is nothing you can do, Ask dreamHost support to reinitialize your public_html directory. Surely they will do that. I searched on dreamhost forum and found these link-
https://discussion.dreamhost.com/thread-13646-post-13647.html#pid13647
https://discussion.dreamhost.com/thread-128630.html
Currently in your case i saw that there is no issue related to public_html (technically "Document Root" ) directory coz as your http://www.inspuratesystems.com/second/ is pointing to correct directory , and your documentRoot is parent of that directory, So if your documentRoot was wrong then there were no chance to access that that url, currently your domain is opening a correct index.html file which indicates that your documentRoot is there.
Create a index.html or home.html file there manually (from their web based file manager) and see if it is working or not, if it works then there is some issue with your uploading.
Your hosting provider seems to be dreamhost.com
Please check out this thread, according to which public_html seems to be a special case on dreamhost:
https://discussion.dreamhost.com/thread-144453.html
and/or this:
Getting a 'Not Found' error on my website?
Hope it helps!
Make sure that the public_html folder has execute permissions
chmod a+x public_html
That will allow execute permissions for everybody.
Perhaps it's possible that server (apache?) hides folders named public_html? Also check that group others have read and execute permissions for that folder.
In folder /path/to/second/ run
chmod ugo+rx .
chmod -R ugo+rx public_html
to set folder visible.
cpanel may handle the "public_html" folder in a unique way. Try uploading to a folder like: /home/yourusername/public_html/second/files/ instead of /home/yourusername/public_html/second/public_html/
If you are wanting to create a new distinct website at inspuratesystems.com/second/ you don't need a second "public_html" folder. Just put them in the /home/yourusername/public_html/second directory.
If you are using a linux or OS X server, you may need to change the permissions on the folder.
Did you checked if the folder is hidden attribute?
If you execute ls -a in terminal, you will know about it's existence. If it is present then please try giving it read & execute permission (using chmod 555 command). Give write permission if you are planning to write something or take feedback from users (using chmod 777).
I tried some of this options above but unfortunately none worked. Instead I discovered that in CPanel you have a "Preferences" tab and in that tab you have a "User Manager" function. You can there edit the ftp user that you created before in CPanel. On the "User Manager" funcion you can find the "Home Directory" configuration. On that home directory you just choose the "public_html". When you configure the user in the ftp account on your ftp platform, it goes directly to the path you defined in CPanel.

www.localhost.com/magento and Index of /magento page shows up

I am trying to install Magento on localhost.
actually, I am a beginner of Magento and stackoverflow.
I have followed guide book and I downloaded Magento sample file.. and unzipped the file at c:/xampp/htdocs/magento
also modified the host file..
whenever I am trying to enter the
www.localhost.com/magento
index of magento page shows up.like ftp server.
How can I open the Magento file as well guide book..
I do not use xammp so I don't know how it's directory structure looks like, but: it looks like you are installing Magento in a subdirectory, right?
If you do so, you have to edit .htaccess. Change RedirectBase to the name of your subdirectory. So here it should be /magento/ And if the RedirectBase line in .htaccess is commented out delete the # at the beginning of that line.
Once magento zip file is unzipped drag the unzipped file in
c:xampp/htdocs/(magento unzipped folder) --->> this is root directory of magento
Now we web browser hit this url
http://localhost/(magento unzipped folder name)
if you are hitting this url first time it asks for configuration and admin url name
to access admin panel
http://localhost/(magento unzipped folder name)/admin url name
That seems to be related with your webserver configuration, and not Magento. If you have Apache, for instance, have a look at your configuration file httpd.conf, and check the line that starts with "DirectoryIndex".
You need to have "index.php" as a valid index file. If you don't, just add it right after DirectoryIndex, restart Apache and it should work fine.
/etc/httpd/conf -> usual location for the httpd.conf file (standard installation, RedHat/CentOS family)
Depending on configuration in the .htaccess file, you might need to specify index.php in the url as such: localhost/magento/index.php or (www.localhost.com/magento/index.php as per your comment) to access it.
Check your virtual host configuration file for the domain name that you are using. If the directory index is missing in the configuration then the apache server will not be able to determine the entry point for the website and will list all of the files.

How do I set up Code Igniter if my public html folder is a soft link?

I am setting up Code Igniter. My public html folder is a soft link to another folder on my server.
Hence, my directory structure looks like
README errors.txt license.txt system
application html user_guide
where html is a soft link to another folder /var/www/myPublicHTML/. html contains my index.php file.
Code Igniter currently issues this error.
Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php
However, I did specify this in my index.php file within the html soft link / folder.
$system_path = '../system';
$application_folder = '../application';
Why is this error still surfacing? I feel that it may be a soft link issue. Thank you.
The directory that the system symlink points to should permit access to all users. The webserver is probably attempting to access the system directory but doesn't have the proper clearance to do so (Note that the webserver doesn't use your user credentials to do its work).
If the system symlink points to /var/www/frameworks/CodeIgniter/2.x.x/system you should see to it that /var/www/frameworks/CodeIgniter/2.x.x/system is accessible to all users in order to allow the webserver to access that directory as well.
Running chmod 755 -R /var/www/frameworks/CodeIgniter/2.x.x/system should grant read and execute access to ALL users (and full access to yourself). Needless to say that you should enter the path to your system directory in the above command ;).
It should be work by default. if not write full path
$system_path = '/var/www/myPublicHTML/system';
$application_folder = '/var/www/myPublicHTML/application';
hi i got the similar problem after a little research i got to know that as i have installed xampp in different folder under c drive which is xampp1 thats why it was getting error so i supplied full path in config.php file which is
$system_path = 'C:/xampp1/htdocs/project/application/system';

Resources