RUN HTML TEMPLATE IN APACHE2 LOCALHOST

When we want to run the html template or html page like :-

URL:-
     file:///home/rohit/Desktop/index.html

We can also run the application in the localhost:-

URL:-
      localhost/index.html

Install Apache:-

sudo apt-get install apache2
then goto the 
/etc/apache2/sites-available/000-default.conf

DocumentRoot /home/rohit/Downloads/html_pages
instead of :-
#DocumentRoot /var/www/html
Then go to the :-

/etc/apache2/apache2.conf

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /home/rohit/Downloads/html_pages>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
then run:-
In the URL :-

localhost/
 
 
We can also refer :-
 
https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Set_up_a_basic_working_environment 
Post a Comment

Popular posts from this blog

CARRIERWAVE - UPLOAD ANY MEDIA (AUDIO , VIDEO AND IMAGE ) FILE IN RAILS

RAILS: UPLOADING PHOTOS VIA AMAZON S3 AND PAPERCLIP (UPLOADING FILES TO S3 IN RUBY WITH PAPERCLIP)

SELECT COUNTRY WITH STATE AND IT'S CITIES RAILS

UNINITIALIZED CONSTANT PAPERCLIP::STORAGE::S3::AWS

HOW TO CALL RAILS API FROM SIMPLE HTML PAGE.

Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension.

CREATE API FOR USER SIGN UP, LOGIN AND CREATE PUBLISHER WITH CURRENT USER

UPLOAD ANY MEDIA FILE IN RAILS USING PAPERCLIP