Skip to content

thelearn-tech/Apache-configure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apache-configure

mm

HitCount

Configure your apache2 Web server ,for termux

When you install apache2 in termux,you need to configure it, to make it work properly

Install.sh is modified by HiFiiDev He created a more beautiful script than me.

Automatic configuration

git clone https://github.com/thelearn-tech/Apache-configure

cd Apache-configure

chmod +x install.sh

./install.sh

Apache2 configuration manual

Just follow the steps--

nano /data/data/com.termux/files/user/etc/apache2/httpd.conf

now scroll down to Listen 8080

(Use ctrl+f to move cursor forward and ctrl+b to backwards) (Use arrow keys ,if you have , like I do)

alt text

And change Listen 8080 to Listen 0.0.0.0:8080

alt text

And scroll down even more To alt text

Now changed index.html to htdocs

alt text Now ctrl x

then y

And enter

So configuration is done

putting you own stuff

To put your own stuff ,move that file or folder with mv

So mv (folder/file) /data/data/com.termux/files/usr/share/apache2/default-site/htdocs

So your server at 127.0.0.1:8080 or localhost:8080

Will look like alt text

changing directory for hosting

Default directory is /data/data/com.termux/files/usr/share/apache2/default-site/htdocs You can change in httpd.conf file

cd /data/data/com.termux/files/usr/etc/apache2

nano httpd.conf

Scroll down to alt text Change DocumentRoot to your like ,as I have

And Directory to same as DocumentRoot

Visiting server

When Apache server is running you can go to http://localhost:8080 or http://127.0.0.1:8080

Or you can use your public IP address for example http://168.198.0.1:8080

Type ifconfig in you termux to get your IP or go to you settings

If you copy don't forget to give me credit

About

Configure your apache2 Web server ,for termux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages