Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
if I serve my laravel application using php artisan serve provided server and if I point URL/storage it's giving me this enter image description here it was absolutely fine.
But if I serve my application using apache or Nginx server virtual host then if I point domain.test/storage enter image description here I can see all folder which is in the storage public folder. Now I want to implement this php artisan serve provided server features on the virtual host.
I have previously used this guide for setting up nginx with the right permissions for laravel. When I try to access the /storage endpoint I get a 403 forbidden error, which I assume is what you want. This way directory listings will be hidden and you would need to provide a full path to the file in order to access it.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 hour ago.
Improve this question
In shared hosting, I installed all laravel application files in the root folder (public_html). But also I deny the .env file via htaccess.
So is denying the .env file via htaccess enough for application security?
Do I have to install the app at the same directory level of public_html and do i have to create a symlink?
Thanks!
So is denying the .env file via htaccess enough for application security?
No.
Examples of where this would not be sufficient:
Someone could access files like storage/logs/laravel.log and see potentially sensitive information.
Misconfiguring/breaking PHP on the server would permit users to browse your PHP files as plain text, potentially revealing the entirety of your source code.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 months ago.
Improve this question
recently I deployed my web application in host (hostinger.com), I have some edits I have to make. How can I use the code editor (PhpStorm) to make edit in the website ?
the project made using laravel framework
I'll not recommend, but in other-hand to gave you an answer, you should :
View->Tool Window->Remote Host
Create a new connection, base on connection type FTP, SFTP, FTPS, Etc..
Set host info and try to connect.
As you can see this option don't need any type of SSH access, and when you've got connected to host, you can see list of files at right side of IDE, and you can :
Browse
Modify them
And of-course change your files in local environment and put/upload or drag them into specified location.
You will need SSH access to your remote files
In phpstorm:
File >> Remote Deployment...
Though it is generally better practice to make your changes locally, rebuild and redeploy to the host.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
We have one .net application in which there is facility to upload images in given storage location. our application is completely windows based. and what it does is it stores images on given path for example "E:\Images".
On the other hand We are using using PHP application (using smarty framework) to display all our uploaded data. In this case everything working fine except images as the storage location is not within the PHP application directory.
I know with the help of symbolic link we can access the images from another disk. It is also working. But if we change the storage location later on then there will be a problem.
I also know that using base64 way we can access images. But it is taking too much time to load If I have a 30 images for one single record.
Can you please suggest a good way how can I access the images? Or how we can improve our symbolic link way?
PHP can access any area of the disk ifallowed. You may need to configure open_basedir to allow such access.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have at home a personal web server running apache where I have a /var/www/{project_folder} to serve my websites, where I access them by the other machines by the IP/{project_folder}, nothing new for now. :)
I have some new projects done with laravel, but I only run them at my local machine to use the cli command to serve where it always runs at localhost:{door}
I would like to put that projects at my web server but I'm facing some difficulties because I only have some basic knowledge about apache and I'm having trouble to figure out the configuration.
I believe someone have already done that :)
Thanks in advance.
Assuming that you already have PHP working with Apache, so your httpd.conf file is fully configured so that if you have a file ending with .php will be handled properly.
All you have to do now is place your project in the htdocs folder where you have all normal project in. That's it.
You could install composer and install Laravel with it. For example via
"composer create-project laravel/laravel --prefer-dist".
See here
Now the tricky part:
If you want to access the site via http://localhost/your-project and not via http://localhost/your-project/public, then do this (depending on you OS):
Activate Mod_Alias
Goto '<IfModule alias_module>'
Then add this line inside:
Alias /your-project/ "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/your-project/public/"
In this case you don't need virtual hosts.
Let me know if you have further questions.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need help with making a webpage from several files and I am not sure how to go about it. I'm not sure how to follow these instructions can someone help me out.
Install:
Copy contents of folder "upload_to_server" to your server.
Open "includes/config.php" and edit $cfg['db_server'], $cfg['db_username'], $cfg['db_password'], $cfg['db_database'] to be your database details, and $cfg['site_url'] to be the URL to the site with a trailing slash e.g. "http://www.example.com/" or "http://www .example.com/example/" (if it has been uploaded to a sub folder named "example".
Import database.sql into your database
![Here is a picture of the files for the site][1]
[1]: http://i.stack.imgur.com/7eHOb.pn g
You need to install a local web stack first. WAMP or XAMPP for Windows, LAMP for Linux, or MAMP for Mac
You are then going to have to locate your web folder, which is usually called www, htdocs, or public_html. This is where your files need to go.
You can import databases from PhpMyAdmin, which should come bundled with your web stack.
Then you use http://localhost/whatever-folder-you-added to access it.