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.
Related
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 want to access the Telegram-CLI using PHP.
I'm compiled Telegram-CLI and loged in to my account, and its works like a charm.
I installed LAMP ([in Linux], Apache, MySQL, PHP) and i tested them works.
I even installed these [following] PHP packages one-by-one using "Composer" and tested the examples but i couldnt make them run...
Also it seems their forum are abandoned to get my questions answer.
php-client for telegram-cli
A wrapper for Telegram-CLI
PHP Wrapper and Drupal module using Telegram CLI
I have no idea how the "Composer" works and how to make them work?
Could somebody tell me how to make one of them work in simple way.
Edit:
All steps of building Telegram-cli, loging in for first time and run it as deamon has beed completed.
This project has been installed on php project root dir using "Composer".
Example.php file has been moved to web server root directory.
But also unning it cause a 500 Internal server error.
The error line is:
$telegram = new \Zyberspace\Telegram\Cli\Client('unix:///tmp/tg.sck');
notices:
The file has been checked and is already there.
And the telegram-cli is running as a daemon on root user.
Edit 2:
I added a telegramd group and telegramd user assigned to that group.
I detacted that php commands running under apache user account.
I changed the apache user group to telegramd.
But again nothing...
So, Please help me
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.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is it possible to setup central git repository for all projects under webroot with WAMP installed?
In other words, each project under webroot should be git-managed at a central pc where other developers can access the same and commit to that local centeral repository instead of some online location ?
I don't know much about network stuff or how other users will be able to access it.
This would create a nice work-flow for the developers ofcourse.
What I have done so far:
Created a folder somewhere on my hard drive named repo
Shared above folder with all permissions with everyone
git initialized it or other projects inside it
Added above folder to apache vhosts file with alias
Now I can access above folder with http://repo.com/
Made apace listen to my network IP instead of localhost from httpd.conf eg Listen 192.168.1.4:80
But other users can't access it when they go to http://repo.com/.
Does anyone know how to setup it so that other users can also access this from my pc and use git as well?
You need a tool to manage hosted git. For example, in the past I used gitosis, but there is other alternatives like gitolite:
https://wiki.archlinux.org/index.php/Gitosis
https://github.com/sitaramc/gitolite
I think you can't install gitosis on Windows, so you need a Linux machine (I have experience running gitosis with Ubuntu with no problems). If you google you can find several tutorials explaining how to run gitosis under Ubuntu, for example:
https://help.ubuntu.com/community/Git
http://www.serverubuntu.it/git-gitosis-ubuntu
I remember it was very easy, but you need some Linux experience. Good luck!
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have installed Apache 2.0(httpd-2.0.64-win32-x86-no_ssl) and it works, then I have installed Php5.3 and it pointed to Apache configuration folder.
failed scenario:
1- create simple test.php, put in under C:\Apache\Apache2\htdocs
2- call "http://localhost:8080/test.php" --> "Bad Request..Your browser sent a request that this server could not understand."
Proposed solution by NetBeans blog (failed)
1-add those two lines to httpd.conf
AddType Application/x-httpd-php .php
LoadModule php5_module "c:/php/sapi/php5apache2_2.dll"
It doesnt works because there is no "php5apache2_2.dll" under my Php installation folder??
I have such .dll : php5ts.dll, ssleay32.dll,..
Any one have any suggestion in order to run the PHP script successfully?
It would probably be easiest to just download WAMP or a similar all-in-one web server, especially since your environment is most likely not a production environment.
Just download php5apache2_4.dll-php-5.3-win32.zip from http://www.apachelounge.com/download/
Here is a guide how to configure your apache to work with PHP 5.4
I know this is not what you asked for but why to use WAMP? First of all it's not a good idea to integrate you desktop with DEV environment (it gets messy quickly). Windows is not a natural environment for web application.
Get yourself a VMWare player (it's free) and install Ubuntu Server on it. Now you can work from Windows on your Linux server. You can also get your VMWare environment home if required.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I've developed an open source application in php and mysql. I'd like to give it to the end user to install on their computer and use from their browser without me having to host it for them. But the end users are non-developers so they're unlikely to have what it takes to run the application (php-apache local environment like a developer would) and I don't have the time right now to invest in learning the Windows or Mac SDKs to make a real windows or Mac application. Also most of those interested in it are friends or their friends.
The solution I'm considering is to package apache/mysql/php with the php app itself, and have the installer install them so the app could run from inside the www/htdocs folder. It's like an app that comes with its own server to run it.
Has anyone done this sort of thing before?
Do I need to build apache/php/mysql from source on windows to do this, or can I somehow use existing windows binaries and have my installer just install them and position my app in the right location?
I'm guessing that launching or closing the application could be done through starting/stopping apache, so how would I implement a start/stop to tie into the apache start/stop.
Any help or ideas on this would be appreciated.
Have a look at BitNami Stacks, should definately have want you need in terms of a WAMP setup
I'd like to give it to the end user to install on their computer and use from their browser without me having to host it for them. But the end users are non-developers so they're unlikely to have what it takes to run the application
Why not provide a hosted solution? Host it on your server and allow your friends to create instances in your server. Is there any reason you can't do that?
you should include the zip of xampp with the files you need for the app preloaded in the htdocs folder. you can have the users extract it to their c drive root and include some sort of README or instructions on how to start up apache and mysql. xampp includes a convenient little control panel for this purpose.
edit:
I personally use xampp all the time when I am traveling and can't be connected to my server for active development. it works wonderfully and is contained all in one folder. It also doesn't require any installation, you just unzip the package. one caveat: installing to anywhere but C:\xampp is annoying.