I have 2 websites i want to host on a Linux machine using Apache server. Since at this point i am unable to acquire a domain name, i access the server through IP, since I'm not required to have one yet.
The first site is comprised of a few HTML pages and is located in /var/hostroot/lifeonearth/{all files here}
and the other is comprised of several PHP pages located in /var/hostroot/webDarts/{all files here}
.
By default when i go to my IP address, it takes me to the default "Your Apache server is working" page. So from here on, how do i make it so that i can access each site through some sort of subdomain like lifeonearth.(my IP)
or webDarts.(my IP)
or, am I supposed to access them throug different ports. If it's the latter, how do I go about it?
Linux server subdomains for multiple sites
781 Views Asked by IneptusMechanicus At
1
There are 1 best solutions below
Related Questions in PHP
- Opening PDF file in SWT Browser - XulRunner default viewer
- SWT CTabFolder doesn't display when running from eclipse
- Sash becomes lost after resize
- Making a table dynamic according to the size of the screen in SWT
- How to align image to center of table cell (SWT Table) RAP Platform
- Unable to set size for a scrolled composite SWT
- RCP or SWT to build eclipse plugin
- How to add html code to the table column header in Eclipse RAP
- SWT Text Widgets in StackLayout—Can't adjust height when switching top control
- How to drag and open file in editor?
Related Questions in LINUX
- Opening PDF file in SWT Browser - XulRunner default viewer
- SWT CTabFolder doesn't display when running from eclipse
- Sash becomes lost after resize
- Making a table dynamic according to the size of the screen in SWT
- How to align image to center of table cell (SWT Table) RAP Platform
- Unable to set size for a scrolled composite SWT
- RCP or SWT to build eclipse plugin
- How to add html code to the table column header in Eclipse RAP
- SWT Text Widgets in StackLayout—Can't adjust height when switching top control
- How to drag and open file in editor?
Related Questions in APACHE
- Opening PDF file in SWT Browser - XulRunner default viewer
- SWT CTabFolder doesn't display when running from eclipse
- Sash becomes lost after resize
- Making a table dynamic according to the size of the screen in SWT
- How to align image to center of table cell (SWT Table) RAP Platform
- Unable to set size for a scrolled composite SWT
- RCP or SWT to build eclipse plugin
- How to add html code to the table column header in Eclipse RAP
- SWT Text Widgets in StackLayout—Can't adjust height when switching top control
- How to drag and open file in editor?
Related Questions in SUBDOMAIN
- Opening PDF file in SWT Browser - XulRunner default viewer
- SWT CTabFolder doesn't display when running from eclipse
- Sash becomes lost after resize
- Making a table dynamic according to the size of the screen in SWT
- How to align image to center of table cell (SWT Table) RAP Platform
- Unable to set size for a scrolled composite SWT
- RCP or SWT to build eclipse plugin
- How to add html code to the table column header in Eclipse RAP
- SWT Text Widgets in StackLayout—Can't adjust height when switching top control
- How to drag and open file in editor?
Related Questions in WEB-ACCESS
- Opening PDF file in SWT Browser - XulRunner default viewer
- SWT CTabFolder doesn't display when running from eclipse
- Sash becomes lost after resize
- Making a table dynamic according to the size of the screen in SWT
- How to align image to center of table cell (SWT Table) RAP Platform
- Unable to set size for a scrolled composite SWT
- RCP or SWT to build eclipse plugin
- How to add html code to the table column header in Eclipse RAP
- SWT Text Widgets in StackLayout—Can't adjust height when switching top control
- How to drag and open file in editor?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
We have 2 website names.
Now Lets create two files called
example1
andexample2
in/etc/apache2/sites-available
.example1
file looks like as followsas the same way create another file called
example2
and modify the following linesand
rest of the file will same as
example1.
Then enable those two sites
Then do apache service restart.
Now we have to do DNS pointing
If your Linux machine is LOCAL then go to your Windows machine where you want to access these websites and open the following file
C:\Windows\System32\drivers\etc\hosts
and mention your ip and website name
Thats it! If you found any difficulties please let me know.
I have replicated this scenario at my end and it works for me. Hope it will work for you!