Code Monkey home page Code Monkey logo

apache-anywhere's Introduction

Apache Anywhere

There are a plenty of one line "run a web site from here" commands that spawn an HTTP server from the command line.

The problem is the web servers they spawn don't always represent the actual web server you might use in production, so they don't support, for example, .htaccess files.

Cue Apache Anywhere, which starts a fully functional Apache server wherever you want, on whatever port you want, as many times as you want.

Got a directory full of html, javascript and css files with cgi scripts and htacces controls? Just fire up apache-anywhere.

It's like Apache, but Anywhere.

Dependencies

None. Comes with the binary and most of the common modules and it's easy to add your own.

Installation

  • Clone this repository to your local machine: git clone https://github.com/julianbrowne/apache-anywhere.git
  • Add any modules into modules or replace the httpd binary in bin if you need to
  • Edit the config file httpd.conf if required
  • Add the apache-anywhere/bin to your path

Usage

apache // starts apache httpd in the current directory at port 8686

apache -p 8123 // at current directory on port 8123

apache -d /tmp // sets root docs directory to /tmp

apache -d /home/user42 -p 8456 // you get the idea

If you're running apache as a regular user then the port number needs to be above 8000 as below that ports are reserved for system processes. Also, ensure that whichever user you are logged in as has appropriate permissions to the access the files in the root docs directory.

apache stop 8123 // stops the apache http process running on port 8123

apache clean 8123 // cleans up all temp files created by process on 8123

apache stats // provides stats about the permanent apache config in etc // useful to check what's already running on what port

Apache log and tmp files are created at /tmp/{process_id}/

apache-anywhere's People

Contributors

julianbrowne avatar marcolabreu avatar

Stargazers

Luc Guerraz avatar Franco Salcedo avatar Julian avatar  avatar li avatar Damien Golding avatar Juvenal Yescas avatar Aditya Varma avatar  avatar  avatar  avatar Marin Crnković avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

marcolabreu

apache-anywhere's Issues

Cannot load modules/libphp7.so

When trying to run I get:
open browser at http://127.0.0.1:80/ httpd: Syntax error on line 23 of /Users/adam/Documents/Web/myserve2/bin/apache-anywhere/config/httpd.conf: Cannot load modules/libphp7.so into server: dlopen(/Users/adam/Documents/Web/myserve2/bin/apache-anywhere/modules/libphp7.so, 10): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib\n Referenced from: /Users/adam/Documents/Web/myserve2/bin/apache-anywhere/modules/libphp7.so\n Reason: image not found apache : error - problem starting server - 0

Any ideas on what I'm doing wrong?
Great idea here btw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.