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

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.

Related

Does file copy deployments work with CakePHP?

I have a legacy CakePHP(1.3.13) app, running on Ubuntu server 16.04, on apache. It is using php 5.6. I'm trying to migrate the app to a development server, also Ubuntu 16.04, but running php 7.2.
On the production machine, php file(s) are being executed even before line 1 of index.php in the app I'm trying to migrate. On the dev box, this isn't happening.
I've sudo tar'ed the entire web server tree, and sudo untar'ed it on the dev box. I've copied the apache site configs, and only edited them for hostnames.
I don't understand why apache is running one or many php files PRIOR to running index.php on the production box. It is apparently loading a custom configuration php file, that sets up some global variable, but for the life of me I can't figure out why this is happening. I'm sure I'm just missing something dumb.
Greg Schmidt nailed it. There was a second auto_prepend_file=MagicallyExecutingScript.php in the php.ini.

Howto run mod-mono and php on same apache webserver

I've successfully implemented mod-mono and apache webserver on a Centos 8 distro.
I've also installed PHP 7.2 on the server and the configuration looks ok on eye inspection.
However, the webserver is not executing the PHP files, but serving them for download.
If i go to http://example.com - it runs the website in MONO space
If I go to http://example.com/info.php - it gives me the PHP file for downloading. It makes me think that it tries to run the php file through mono and fails, so gives it to me for download instead forwarding it to PHP for execution.
Is it possible to run both PHP and MONO code on same apache webserver?
If yes, what could be the tricks to have it working ?
Many thanks.
Actually having a separate PHP website and also MONO websites in same apache server was working. However I though things were not working since I tried to run the PHP file from within the MONO-handled virtualhost ... so no need for clarifications.

Move files from node.js to apache server

Is there any possible for moving files from platform like Heroku to second server like Apache? I want to create application and push it to Heroku, but I have also Apache server and I want send to this server all images which I upload from frontend forms.
EDIT
ok so You want to use Heroku as the main application server. But then Heroku makes HTTP/HTTPS requests to the Apache server?
I think thats what you are asking.
Yeah no issues with that. if you want to set up API id go with Laravel 5.3 and use its passport function on your Apache server ( but this is not required, this is only for security.)
https://laravel.com/docs/5.3/passport
END OF EDIT
what the web server is really does not matter at all.
Its about if the server has internet access and im pretty sure they do.
Easiest way is ftp,SSH,or git. unless they both have a web server then id just zip up your app without the node_modules folder and move it into the web directory. then go to the address of your server in a web browser. eg. http://mywebsite.com/files-i-just-zipped.zip and download them. (i normally log onto the new server via SSH and do wget http://mywebsite.com/files-i-just-zipped.zip)
I need more info but yeah. once you unzip then you need to install node but my guess is they already have it.
then do npm install in the package.json directory.

Laravel - connect to development server

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.

Apache running MongoDB and PHP

I'm using XAMPP in my Mac OSX. I've installed mongodb and copied the .so file into xampp plugins folder. My phpinfo() of the page shows that MongoDB section which is installed.
After i start Apache of XAMPP server, when i code
m = new MongoClient();
$db = $m->mydatabase;
$collection = $db->myCollection;
Its saying some Fatal Error.
If i run mongod command in Terminal window, its working. Then what is the use of installing mongodb in XAMPP server. My Questions are
Why its working like that..?
Is there any way to start mongod when we start Apache server.
Why its working like that..?
Installing the PHP driver and the MongoDB server are two completely different things.
This is very basic driver stuff; you require a library or communication layer that can route your PHP programming to the MongoDB server (basically).
Is there any way to start mongod when we start Apache server.
You could make an sh script that looks like:
/etc/init.d/xammp_service_dunno_what_it_is_called start
/etc/init.d/mongodb start
Then you could just attach to the startup, or even better you can just attach both services (XAMPP and MongoDB) to the startup of your computer.
However, as far as I know, there is no way to create a sort of trigger mechanism that will load up MongoDB when the OS detects that you have started running Apache.