Laravel - connect to development server - apache

I just installed laravel and need some clues regarding "development server" and how I can run a project.
I connected to laravel development center which opened port 8000 on localhost. So I access my project at
localhost:8000
It wouldn't work if I typed in localhost/thelaravelproject/somepage , as I do with other php projects during development.
After closing the command line tool, localhost:8000 became inactive, so I opened the command line again, entered the path, and then
php artisan serve
and then it was running again. Does this mean that I have to do this every time?
On this page laravel.com/docs/4.2/quick it says something about "Local Development Environment" and it mentions Laravel Homestead. Is this something that is needed to run laravel using localhost the way I normally work with php?
I follow tutorials, but it's strange how they leave out very important details.

I found out that localhost works the normal way, I just have to add the 'public' directory.
So if I type in
localhost/thelaravelproject/public
it shows the 'you have arrived' page.

In laravel project Directory every things first goes to the public/index.php.
so it have to be in that directory.
you have to start from this
localhost/thelaravelproject/public.
following link will help you.

Related

How do you install an apache server (httpd) on codenvy?

I would like to have a simple httpd server on my codenvy machine in order to run a front-end web app. How do I install it?
Create a workspace with the template "php-default", then a php project. Try run, access the url the "start apache" gave you, and it should work ! I got a running app in less than 3 minutes.

Laravel serve getting ERR_CONNECTION_REFUSED on localhost

I'm having an issue with my local laravel server. I'm building an API, and I need to test from another device, but the only url which is working is:
localhost:8000
If I try
127.0.0.1:8000
or using my machine local IP
192.168.0.6:8000
I have a ERR_CONNECTION_REFUSED from chrome (I tried with safari too).
There is no 'blocking' extensions
I found the answer: artisan serve isolates the host, so if I want to specify it, I need to do:
php artisan serve --host=127.0.0.1
Depending on what project you may in! In our case we had a bought project!
And https is configured by default! So https://..../app.css will not be accessible!
When you visit the link again in chrome it switch to http://.../app.css and it will work!
For our bought base code an env variable was setup and i just disabled it as bellow:
You may like to disable it in development!
This link may be helpful too!
How to force Laravel Project to use HTTPS for all routes?
Otherwise you can setup https to work well! Check how to do that with apache! Or nginx !
Otherwise know that you can't do it with php artisan serve! And you'll need to disable force https!
See the option bellow! (check the first answer to see if you can still use php artisan serve! And read the second one! To get why php artisan serve doesn't support https)
Laravel php artisan serve to mimic HTTPS
I hope this may help some! That fall on the same problem! Which is a line of things to check to add to the list here!
php artisan serve :
Laravel development server started on http://localhost:8000/
so you can only access to this server by http://localhost:8000/
I had that problem because I forgot to execute npm run devto launch Vite server.
Open up the terminal window in your working directory and run
php artisan serve
You will then be able to access your laravel local development through your browser by using the URL http://localhost:8000

marklogic "getting started" app returns 404 on mac

I'm running MarkLogic 8 (developer edition) on Mac OS 10.10.1.
I'm a beginner with ML, and I'm reading the "Getting Started" material in the online docs, in particular the section "Sample XQuery Application that Runs Directly Against an App Server."
I created the "TestServer" app server just fine, following the instructions. I then copied and pasted the text for the four XQuery files in the exercise, load.xqy, dump.xqy etc.
My local copies of the four .xqy files are under ~/Library/MarkLogic/Apps/Test, per the instructions. Read and execute permissions are open along the entire filepath, down to the .xqy files themselves.
When I request http://localhost:8005/Test/load.xqy, as instructed, I get a 404 Not Found response.
lsof -i :8005 indicates that MarkLogic is indeed listening on port 8005.
I checked the TestServer configuration against the instructions, disabled and re-enabled TestServer, stopped and re-started ML--always with the same result: 404 Not Found.
I haven't been able to find anything in either the ML mail archives or Stackoverflow to get me past this sticking point.
Any ideas or suggestions would be very much appreciated. Thank you!
This seems like a permission issue. Does it work when you run it as the admin user?
Have check to make sure the files are loaded into the modules database?
Also check the permission got set with the correct role for those file.
Check to see that user that is running the app has the role that you used when setting permission on those file.
This worked for us:
In the TestServer configuration instead of just putting Test in root field, put Apps/Test/ which is the location of the 4 files (load.xqy,dump.xqy, update-form.xqy and update-write.xqy relative to the MarkLogic installation directory -- in our case, centos, this was at /opt/MarkLogic/)
And then issued this command
chmod +r *.xqy
If you follow all the instructions correctly just remove the Test from the url. If yours is "http://localhost:8005/Test/load.xqy" make it "http://localhost:8005/load.xqy"

Odoo v8 fails to load from remote server installation

I downloaded latest version of Odoo (Openerp v8) from GitHub. When installed on my localhost (my pc) it works fine. Now whenever I tried to install it on my remote server, database is created but not loaded and I have a blank page when it comes to my-remote-ip:8072/web (I launched it openerp-gevent along my config file but the same happens with the openerp-server command too).
When I check the log file, the process is stuck at:
.... INFO my-db-username openerp.addons.base.ir.ir_http: Generating
routing map
The last request processed by the system is:
'werkzeug.request': http://my-remote-ip:8072/web/js/web.assets_backend/77f77e2' [GET]>
This request is not served and leads to a blank page. I'm on ubuntu 14.04.
I wonder if there is protection in the coding that prevents odoo to be used from a remote server.
Please, can someone help me how to bypass this issue?
Use different DB for your remote server not same as localhost.
try to run remote server using this command
./openerp-server --xmlrpc-port=8072
you can change the port number.
Hope this will help... :)
I've been testing in virtual machines recently. IMHO check the postgress database and if all is working fine, then check python dependences, perhaps you missed some?
I've used this quick guide with success for my ubuntu 14.04 Vm with odoo 8
Thanks but your answer is not satisfying. I said that it works well on a local installation. And I know quite well about the installation process whatsoever.
Now, try to install Odoo on a remote server using your IP adress (which is my case as I haven't given a domain name to my VPS yet). You will notice that the installation process is not going to its end and points to a blank screen. I need to have feedbacks from persons who have tried the same operation. Again, thanks for all your valuable contributions to this issue.

localhost configuration in offline mode

I'm in a very stupid situation and if I didn't get to resolve it my project will be rejected.
I doing a project for a company that they have hard network security and I can't publish the project online or in a local server.
I'm using on my project PHP and MySQL using usbwebserver program "it's offline Apache server".
now the problem is:
my project should to be on a network as a folder example: \server1\project
and to open the project on my computer I have to access the path and run usbwebserver.exe , so it is open perfect for 1 user but if I try to access the same project in other computer when the first user using the program the Apache not running and I think because the port of apache already in use."maybe I'm wrong"
my question is if there any solution that when other users on the network click on usbwebserver.exe
the apache become running on it .. because I have to use the same DB.
If there is other program that can solve my situation to everyone can work on same apache and same DB offline also I will appreciate!!
I thinking in this way if it possible:
Install Apache on your machine and call mysql from server folder that doesn't run Apache!!!
it is possible ? and if yes how can done it ?