PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, January 14, 2022

[FIXED] LAMP multiple websites

 January 14, 2022     lamp, php, ubuntu, web     No comments   

Issue

I'm newbie to Ubuntu. Installed LAMP. Have several questions about it

1) let's say first websites dir looks like : var/www/first/ and second ones: var/www/second. How can i set up multiple website, and use them with seperate ports (like http://localhost:81/ and http://localhost:82/ ) as on IIS?

2) How can i change default location of webserver (default is var/www) or exact website?

Thx in advance


Solution

1) Create virtual hosts in your apache configuration. On my install of Ubuntu (which is older), the configuration file is /etc/apache2/sites-enabled/000-default.

2) In the configuration file mentioned in 1, you can change the DocumentRoot of the default site.



Answered By - Kaleb Brasee
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing