this is my web server directory
Data folder contains all project code
and public folder data resides in public_html/alpha
like this
my index.php file which is in public_html/aplha
require __DIR__.'/../../data/bootstrap/autoload.php';
$app = require_once __DIR__.'/../../data/bootstrap/app.php';
and finally my server.php file
require_once __DIR__.'../public_html/alpha/index.php';
i have also given all permissions to public files but still getting Inter Server Error
i am trying to make domain.com/alpha home directory
and route '/' will be called like domain.com/alpha/
I don't see a Laravel project inside your /alpha
Their are some simple steps for run projetc on server..
First Project will upload in /public_html or (/public_html/Project_name)
Check Your php version.. Because its only compatible with php 5 or above
Rewrite module must be enabled on server.
Rmaining part must be same as like your local project then run it on the domain.
Related
I am using a shared host. Inside my shared host public_html, I have a folder named project1. This folder contains the files for my main site.
I want to create a new folder (e.g. Project2) for my new Laravel 8 application. I've tried putting all my file inside public_html. It is working when I visit the site using the example.com/project2/public/index.php URL format. But the problem with this is that my important file like the .env, will be public.
I've also tried this but when I tried to run the project, it gave me a 500 error.
Try changing the name of server.php file to index.php and copy .htaccess file from public folder to same location where server.php
I've already deployed a laravel project to the server with CPanel. I've transferred all the public files in websiteA to the public_html. It works fine. The directory looks like this.
/home/tuturu
->public_html
->websiteA
->app
->vendor
-> ...
Now I'm trying to add an addon domain websiteB to the same server. As its a laravel project and want it to be pointing at the public folder, I've seen the root document to be public_html/websiteB/public. Now, the directory looks like this:
/home/tuturu
->public_html
->websiteB
->app
->vendor
->public
->websiteA
->app
->vendor
-> ...
I've also changed the index.php inside the public folder to:
require __DIR__.'/../public_html/websiteB/vendor/autoload.php';
$app = require_once __DIR__.'/../public_html/websiteB/bootstrap/app.php';
but when I go to websiteB, it gives an HTTP 500 error. Thanks in advance.
Create a folder in your home directory for example my_websites:
Upload two of your sites to this folder:
Configure your "Add-On Domains" to point to Laravel's public folder for each site:
Keep in mind that paths are case sensitive on Linux systems.
I zipped all my files before uploading it to elastic beanstalk. However I'm getting an error message:
Not Found
The requested URL /was not found on this server.
I did some research and came across the following post:
https://forums.aws.amazon.com/thread.jspa?threadID=127927
"The '403 Forbidden' error was because of the file structure of the zip folder. In order to upload properly please highlight/select all the contents "inside" the folder then you can compress/zip the contents and not the folder itself. That is, you cannot have a nested folder inside the zip."
I have done as told, except that I have selected the files AND 2 folders which contain some files. This may be causing the issue(?)
What should I do?
As you have mentioned that you are facing “The requested URL /was not found on this server”, you need to ensure the following:
1: Make sure your application has the file that .htaccess is
redirecting to your welcome page. 2: You need to set the public
folder as the root folder. For this, go to the Elastic Beanstalk
Console and Click on “Configurations”, then modify Software . Update
the “Document root” to the folder that contains your site's
default page. For example /public if the welcome page is in a folder
named public.
How can I restrict PHP files from getting executed outside the application folder?
I am using CodeIgniter and I have heard it somewhere that this thing is possible in CodeIgniter.
Temporary, I have added request in htacess which will surpass each request from index file and will result in not found.
Add public folder, move index.php into it, inside index.php change application and system folder settings to ../application and ../system respectively. Point domain to public folder.
I am working on files in drupal. i use local wamp server with drupal6.
my drupal path is localhost/drupal6 .i have a file in this path <drupal root >\files\images\111.jpg .
$image='/drupal6/files/images/111.jpg';
I want copy(or move) this file to another sub folder in this path but give me error in php copy($image,'anotherdestination') or drupal_copy($image,'anotherdestination',FILE_EXISTS_RENAME).
when i use var_dump(file_check_path($image)); it return me false .
the files and iamges folder have all permission for any user in windows.
where is the problem?
notice: i wrote all of this code in a function in a custom module with path sites/all/module/mymodule/mymodule.module
There's a difference between how files are accessed over HTTP and via the file system. Over web /drupal6/files/images/111.jpg is perfectly fine, since it'll be evaluated as http://example.com/drupal6/files/images/111.jpg. But I bet you do not have a drupal6 directory in the root of your file system.
You probably want something like this.
copy('c:\drupal6\files\images\111.jpg', 'c:\drupal6\files\other_images\111.jpg');
I'm not entirely sure about paths in Windows but I think that should be correct.