How to Make a Raspberry Pi Web Server

By Alok Naushad

Raspberry Pi Web Server

 

In this tutorial, I am going to show you how to set up a Web Server in your home by just using a Raspberry Pi. Using this, you could create your own personal Raspberry Pi Web Server which allows you to access your files from any part of the world using the internet. no need to worry about the DDNS Client, you can get it for free from no-ip.com. We will be using Apache, PHP, and MySQL to build this Raspberry Pi Web Server. So let’s get started!!

Required Materials

  1. Raspberry Pi 2/B+
  2. Wifi router with access to the internet
  3. Wifi dongle for Raspberry Pi or LAN cable

Resources 

Basic Linux Commands for Beginners

How Does it Work?

We will be first setting up your Raspberry Pi as a local server by installing Apache, PHP, and MySQL and testing it. After doing this, this local server can be converted into a web server through port forwarding technique from your router. After performing port forwarding, your Raspberry Pi will be accessible through the internet as your router will point to it. Check out this block diagram for the detailed step by step process to build your Raspberry Pi web server.

 

Raspberry Pi Web Server

 

 

Installing Apache, PHP, and MySQL for your Raspberry Pi Web Server

Before we start, make sure your Raspberry Pi is up to date and if not, update it by running the command below in your terminal:

sudo apt-get update

Next, we will start installing all the packages necessary for our Raspberry Pi web server. But before that, perform the command below. This helps you to get in to the root of our system. So from now on, we do not need to use the ‘sudo’ command all the time.

sudo bash

Now let’s install ‘Apache’, the main component of the project. For that, use the following command:

apt-get install apache2 apache2-doc apache2-utils

After this, it is time for PHP to get into our Pi:

apt-get install libapache2-mod-php5 php5 php-pear php5-xcache

These won’t take long. Now we should install the package for database connectivity (PHP->SQL):

apt-get install php5-mysql

Now we can install the MySQL server which stores everything, our database for the Raspberry Pi web server:

apt-get install mysql-server mysql-client

During this installation, you will be asked for a password for the server. Enter a password that you will remember. That’s it! You have completed the first step! Now reboot the Pi.

Testing the Installed Packages on our Raspberry Pi

Type ‘localhost’ or ‘127.0.0.1’ in the Pi’s web browser. If you have SSH’d into it, type the Pi’s IP address in your browser. Now you should see a page saying ‘It works!’. If you see it, the server is set up correctly. If it doesn’t, you should repeat with the commands listed above and check for errors.

 

Raspberry Pi Web Server

 

You can edit the web page by changing the index.html file in the ‘/var/www’ directory. You can put anything into that folder and you can see it in your local area network when the Pi’s IP address is entered. Watch this tutorial for learning about HTML and web page editing.
Now, for testing myself on your Raspberry Pi, open up LXTerminal and type as follows:

sudo mysql -uroot -p

This should ask you for the password you entered before during the installation, enter it. If you have entered the correct password you should get a screen like this.

 

Raspberry Pi Web Server

 

You can now use MySQL control your databases. An easier way to do that is down below.

Installing phpMyAdmin for your Raspberry Pi Web Server

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL or MariaDB with the use of a web browser. This makes it easier to control the database. To install it on your Raspberry Pi web server, you can use the following commands. Open the terminal and let’s start with:

sudo apt-get install phpmyadmin

This will start installing the packages. You will be asked which Web Server is to be used. Choose apache2.

 

Raspberry Pi Web Server

 

Next, we will need to configure the database phpmyAdmin should use. For that you should select Yes when asked:

 

Raspberry Pi Web Server

 

After this, you will be asked for an administrative password. Type in the password of your MySQL database you installed earlier. Next, you will be asked for a custom password for phpMyAdmin. I typed in the same password of MySQL, as it will be easier to remember. If you wish, you can have another password too.

Now, we need to combine apache with phpMyAdmin. For that, you should edit the apache2.conf file. For that, type the following in the terminal:

sudo nano /etc/apache2/apache2.conf

At the end of this file (navigate using Ctrl+V), add a line:

Include /etc/phpmyadmin/apache.conf

Now restart the server using:

sudo /etc/init.d/apache2 restart

Now, check out the link in your web browser: <pi’s ip address>/phpmyadmin or localhost/phpmyadmin in your Pi. You should see the page below.

 

Raspberry Pi Web Server

 

As the username, you can type in ‘root’ and as the password, you can type in the password you gave for the MySQL Server. If that doesn’t work, just try with the phpMyAdmin password. If you can log in successfully, Voila! That’s done.

Now, you can have your own site by customizing the index.html or by inserting a customized html file and renaming it as index.html in the www folder. You can put images, videos, or whatever you want in the www folder and access it in your Local Area Network(LAN). Now that you also have a database of your own, you can maintain the site with it. So we can call it your ‘Server’, a Raspberry Pi web server.

Now, we are going to make our local server available to the whole world! Follow the steps below to do it:

Giving your Raspberry Pi a Static IP Address

Now, you won’t be able to access your server from another network. You can only access your server within your Local Network. We are going to make our server available worldwide to the internet! Let’s start connecting our Raspberry Pi web server to the internet.

The Modem in your house gives a number to all devices connected to it to understand the devices. This number is called Internet Protocol (IP) address. It is something like this xxx.xxx.x.x. There are 2 types of them: Internal IP Addresses and External IP Addresses. What I mentioned above was about the Internal IP address: a number given from the modem to the connected devices to locate it. There is a number given to your modem by your Internet Service Provider (ISP) to locate computers and systems. This number is called as an External IP Address.

We are going to talk about the Internal one. What our modem gives us is a random number. Mostly, it starts like 192.168.1.xxx or 192.168.0.xxx or 192.168.xxx.xxx. The random number is called by a name or DHCP. The hostname is also similar to the IP address. It is a label given to devices connected to a network to identify them. The IP Address of the Pi is set to DHCP. We need to change that into a static IP address. For that, we need to edit a file in our Pi. Before that, we need to gather some information about our network. For that, type in the following commands. Have a paper and pen with you before that!

Perform the command: ifconfig

 

Raspberry Pi Web Server

 

Note the highlighted line in the above picture.

inet address: 192.168.1.35
Bcast: 192.168.1.255
Mask: 255.255.255.0

 

Now, we need the gateway and destination address. For that, type in the following command:
netstat -nr

Raspberry Pi Web Server

 

Take a note of the highlighted parts: 

Destination: 192.168.1.0
Gateway: 192.168.1.1 

 

Now let’s edit the network interfaces. It is located in /etc/network/interfaces.

sudo nano /etc/network/interfaces

In this file, you can see something like this:

 

Raspberry Pi Web Server

 

The highlighted part, which is iface eth0 inet dhcp should be changed to: iface eth0 inet static

Under that line, add the information we gathered earlier in the below format.
Note: Change the numbers written below with yours. I have written mine.

 

address 192.168.1.72
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

 

What are these numbers?

 

address: It is the inet address, you got from the ifconfig command. You can give any number starting with 192.168.1.xxx. The xxx can be replaced with any number. It is better you have it between 2 and 100. Choosing a higher number is recommended since a lower number may result in a clash of IP addresses, meaning two devices might have the same address.

 

Netmask: It is the Mask address in the ifconfig command.
Network: It is the Destination address you got from the netstat -nr command.
Broadcast: It is the Bcast address you got from the ifconfig command.
Gateway: It is the gateway address you got from the netstat -nr command.

Finally, it looks like this in my file.

 

Raspberry Pi Web Server

 

Now, press Ctrl+X to save it and press y. Then remove the existing leashes using this command in your terminal:

sudo rm /var/lib/dhcp/*

 

After this, you should reboot your pi and check the ifconfig command. Remember, you can’t SSH with your old IP address now, check SSH ing with the new one. In mine, ifconfig looks like this.

 

Raspberry Pi Web Server

 

If the inet address shows your new IP Address, congrats! You have a static IP address.

Setting up Port Forwarding and DDNS on Your Raspberry Pi Web Server

Now, we are going to do something out of our Raspberry Pi. We are going to play with our Router or Modem. We need the gateway address that you wrote down earlier. You can do this procedure on your computer or Pi. I recommend doing it on your PC. For that, open up your browser and type in the gateway number in the URL column and press Enter.

You will see either a login screen or a box come up and ask for your username and password. Sometimes, it might be there written on your modem or else, you should try guessing. Don’t worry, I will give you some options:

 

Username Password
admin admin
admin password
username password

 

If these doesn’t work, make it blank and click login. Or call the customer care of your modem’s company.

After logging into your modem, you can see a page similar to this. This is what I see in my D-Link DSL-2750U Modem. You should also see something similar to this.

 

Raspberry Pi Web Server

 

In this page, you can see a tab called “Advanced”. You should now click that and select Port Fowarding.

 

Raspberry Pi Web Server

 

After that, you should click ‘Add’ in the Port Fowarding Menu and type in as shown:

 

Raspberry Pi Web Server

 

Select the Service as ‘Web Service (HTTP)’ and type in the Server IP Address which is now the IP Address of your Pi. The External and Internal Port start and stop should be 80. After that, click “Apply”. Now, we have forwarded the 80 port to the 80 Port of your Router.

Now we have to setup the DDNS, which stands for Dynamic DNS (Domain Name Setup). We are using a site called No-IP for this. It helps us to get a URL for our router, which has forwarded the port 80. So let’s create a URL for our Raspberry Pi Web Server!

 

Raspberry Pi Web Server

 

First, we need to sign up for an account in www.no-ip.com. This service is for free. You can either select a subdomain now or select one later. There are 4 subdomain options. You can also choose a domain by paying. But in this tutorial, I am going to show you to get a subdomain URL for your Raspberry Pi web server.

What Dynamic DNS does is simple. I mentioned earlier that our ISP (Internet Service Provider) gives us a random External IP address. No-IP.com changes our IP Address into a URL. We also configure this in our Router which will be shown soon. So, whenever our modem gets a new IP, it sends it to No-IP.com by which they connect the new IP Address and our static URL for our Raspberry Pi web server. The URL never changes but the IP does.

After account creation, you should activate your account using the e-mail sent by No-IP.com. You can sign in to your account after the activation of the same. You can see your new URL in the submenu Hostnames under Dynamic DNS Menu.

 

Raspberry Pi Web Server

 

You can check your URL by clicking on it. As your Raspberry Pi Web Server is just set up, you can see the It Works! Page.

Our Next step is to configure the router for No-IP.com’s Dynamic DNS. For that, you should again go to your Router’s page and log in. After logging in, you should select the Advanced Tab Again and in that, you should find an option Dynamic DNS.

 

Raspberry Pi Web Server

 

If it is not in the Advanced Tab in your Router you should find it somewhere else. All the new Routers have this menu. If you don’t find it still, try updating you Router’s Firmware.

Click Add in the Dynamic DNS Menu of your Router. Fill out the details.

 

Raspberry Pi Web Server

Click Apply and There you go! Everything is done. You have your own Raspberry Pi Web Server. You can access it with just one URL. Accessible to the whole World! All the best with your Server! You can make amazing websites easily using the templates available on the internet.
NaySo Technologies is my future company. That is why I gave the name NaySoPi for my website. You can find my website running on my very own Raspberry Pi web server here: naysopi.ddns.net

 

Raspberry Pi Web Server

 

Any problems? Please put them in the comments!
[/vc_column_text][/vc_column][/vc_row]

Recommended Posts
Showing 86 comments
  • Dotara
    Reply

    Thank you for your guide.
    I have a question. What is IP “117.196.151.255”? It was been generated by no-ip.com or your public ip?

  • Eun
    Reply

    Thank you so much your awesome tutorial. This was very straightforward and helpful.
    I set up everything it works from outside of the network too.
    However, my question is:
    1. I set up the static IP address for my device and set up no-ip to point my IP address (current). Then what is point of configuring DDNS on the router? maybe I’m bugging out.. please explain it to me.
    2. For port-forwarding, why is it 80? but not 22?
    3. Do you have any recommendation for securing the data?

    Thanks in advance!

  • Eric
    Reply

    Hi, great DIY but please update some of the info given, for instance de index.html files can now only be found in var/www/html/.
    Regards

  • Rohan
    Reply

    Hello Alok,

    First of all thanks for such a clean explanation.

    I am able to access my page from LAN but not from outside world.

    I have not configured static IP intentionally as DHCP is always giving same IP address(I will do that later. This should not matter i think as on LAN it is working fine ).

    Thanks.

    • Alok N
      Reply

      Hi Rohan,
      Thanks for referring my tutorial! If you have set the no-ip.com and port forwarded Pi’s IP, then you should be able to access your pi. Just check connecting to your Public IP.

  • Ellen
    Reply

    Thank you very, very much for this detailed and functional tutorial on how to create a pi web server. I found it extremely helpful! I just got my pi today and after going through your work – a fully functional server. Thank you!

  • benno
    Reply

    hi thanks or the tips ..// working in the about apache server…..

  • Apostolos
    Reply

    Thanks a lot for the detailed steps of this great project.
    I have completed all steps, and inside my LAN everything works fine.
    From outside though, I’m getting:
    This site can’t be reached
    xxx.ddns.net took too long to respond.

    Any idea?
    Port forwading is in place. What could possibly be wrong?

    Thanks a lot
    Apostolos

    • Alok
      Reply

      It might take some time for no-ip.com to direct your ip to the address…

      • Sam
        Reply

        HELP PLEASE! I had this all working and I was using it to learn pen-testing and SQL, but I have come back to it from a bit of a break and when I type in the url, it brings me to my router gateway login screen… Any idea on how to fix it. (Also, when I type in the public IP, it takes me to the correct page.)

        • Alok N
          Reply

          the problem is with your Port Forwarding, I hope… Check the ports that you have forwarded.

  • Raze
    Reply

    Excellent guide, intuitive and easy to follow. Well done.

  • royster
    Reply

    The apache defulat page is now changed

  • Mary
    Reply

    I did exactly what you said but still not accessible from another network, can you please help me ???

  • Stephen Drake
    Reply

    I feel SO close to having this setup. I did all the steps with no issues but when I use my public IP address or the ddns.net domain, I’m taken to an xfinity login page instead of being served my website. I enabled port forwarding. I don’t know what to do!

    • Alok N
      Reply

      Hi Stephen,
      If you have registered at No-IP.com and you have set the proper settings in your modem, then it should probably direct it to your modem and as you have port forwarded it, it should go to your web Server.I think the problem is with the port forwarding because the xfinity login page must be your modem’s. So, you should redirect that to your web server using using the port 80, with your RPi’s IP Address. if there is still any problem, please contact me at [email protected]

  • Adam
    Reply

    I wish I knew this stuff 5 years ago. Here’s a photo gallery you can set up on a Raspberry Pi pretty quickly: https://github.com/zvakanaka/photo-gal

  • Alok N
    Reply

    Hi Everyone,
    I just wanted to say to make sure your RPi Servers are safe. I have been taking courses on Ethical Hacking. So, being known about the vulnerabilities, there is something that everyone need to ensure. Please keep your server and all of it’s components up to date. If any confidential info. is kept in it, ensure that the server is secure. Keep your server passwords strong by including numbers, mix of upper case letters and symbols.

    Thank You!
    Alok Naushad

  • Nikhil Bhambid
    Reply

    What will be my document root directory after converting pi to server.

    • Alok N
      Reply

      I did not understand your question… Everything remains the same in the Pi, no change to the directories.

  • Patrick
    Reply

    That the first time I saw a so well writen instruction. Is like a sugar candy. Thanks.

  • Wassa
    Reply

    This was a “TOP” instructional project, keep up the great work.
    Bloody good stuff !!!!

  • Pratik
    Reply

    Hi Alok,

    Thanks for awesome blog on raspberry pi. I really appreciate your efforts.

    As I was going through the blog, I put the http://naysopi.ddns.net in my browser. I got a prompt which was after for password. I put the details then I am getting web page which does not match with screenshot that you share. It contains information about device and it have logo of BSNL and SYRMA TECHNOLOGY. Can you please look into this? I f you have updated the url then let me know.
    Thanks in advance.

    • Alok N
      Reply

      Hi Pratik,
      Thanks for checking out the website, m sorry that you couldn’t find it. Actually, the domain name was expired. In No-IP.com, if you don’t renew your hostname every 30 days, it gets expired. I have shifted it to a new domain named nayso.ddns.net. Sometimes, my server might not be on. I’ll try to keep it on this week. :)

  • Leo
    Reply

    Thank you for putting up these clear steps! I have one question. When I try to create the static ip and follow the instructions it does not want to change after putting all the information and rebooting the raspberry. Something that was different was that in the in the /etc/network/interfaces I only had “iface lo net loopback” and “iface eth0 inet manual” I changed manual to dhcp. But my inet does not change after following all the instructions.

    • Alok N
      Reply

      Ohh… it might just be a simple mistake, something you forgot to do… Still, no worries! There is an option called DHCP Reservation in your modem. You could reserve an IP Address for your Pi, by its MAC Address… Just google it to know more…

  • JFolse
    Reply

    You are great. Where do you find time to learn all this? My great grandson is half your age and fighting to catch up to you. Impossible task. BUT my opportunity is: CAN NOT do the port forwarding on my router, 300M Wireless N Router Model No. TL-WR841N. It will not let me use port 80 as either the internal or service port. Any other port number is acceptable. Use 80 as either or both and get: “The port of the remote web management is conflicting with of the virtual server.” Exact quote. Meaning? Significance? Solution?
    Thanks muchly in advance..
    JFolse

    • JFolse
      Reply

      S’ok. My router was using port 80. Went into router and changed it’s port to 8080 thereby freeing up port 80 for me to use. Now if noip.com would only reply to my two requests to resend a confirmation email for either of my applications ???

      • Alok
        Reply

        Same thing happened to me!! I was stuck at this point… after some calm thinking, i got the point! I went into access control and changed the router page into a port 5555, now i can access the server at 80 and access my gateway with 5555 port.

  • Dan
    Reply

    Great walk through on setting this up! I was wondering, why did you include an sql database for this? What would you see as being a typical application of sql here in this context?

    • Alok N
      Reply

      Well, if you r a good programmer, you could make a photo server using MySQL!

  • Squall
    Reply

    Very good!!!

  • ilya svatutsa
    Reply

    Important thing to add to your tutorial is that if the person uses WiFi on their Raspberry Pi, rather than cable ethernet, then instead of editing “iface eth0 inet manual” they should be editing “iface wlan0 inet manual”.

  • folgado
    Reply

    http://compraseguidores.com/
    Іt’s very easy to find out any matter on net ɑs compared tо textbooks, as I foᥙnd this post at this website.

  • Eu
    Reply

    Is .php works?

  • Willem
    Reply

    Hi. When I connect to my localhost or to the Pi’s ip address, I do not get the phpMyAdmin screen as in step 3 above. I have swapped the index.html file in /var/www/html/ to another html file I have written previously, before I got to your instructions. I get this page displayed.
    I use a RPi3. I see you specify the directory where the content is stored as /var/www . Is this because of mine being a Pi3?

    • Willem
      Reply

      Sorry, I did not see the /phpmyadmin after the ip address.
      Great project!

  • Jan
    Reply

    I’m using the flask of raspberry pi, made a webpage and access it through my local network.’In order to access my webpage remotely, can I skip steps 1-3 and proceed to step 4 and 5 or do I need to Apache web server? Is flask enough?

  • syed nayab
    Reply

    wow man… at your age i was trying to think what to do with my life.. BTW.. i have rasberry PI and figuring out if i can host my WordPress blog on it …will keep you updated

  • IcedLemonTea_
    Reply

    hi there, I would like to ask can I use a raspberry pi 3 instead?

    • Alok N
      Reply

      Of course! You can… It will work with any version of RPi, which can support Network(All of’em does i think)!

  • Mike
    Reply

    Is there a way i can use filezilla to upload stuff to the webpage?
    I am trying to connect but it wont allow me

    • Alok N
      Reply

      I use Filezilla to transfer files and SSH to control Pi. You can also… Try setting a new password for the pi by using the command “sudo passwd”(without quotes). Then in filezilla, mention the port 22 with host [email protected].s and username pi and password, the pass you set earlier! It should work!

  • toto40530
    Reply

    Really good job man !!

    • Alok N
      Reply

      Thank you for checking out!

  • Steph
    Reply

    You did a wonderful job here- best I’ve seen :) Keep up the great work.

    • Alok N
      Reply

      Thank you!

  • Peter Dodd
    Reply

    Thanks Great Article, performed your steps and everything is up and running. Basic page so far

    • Alok N
      Reply

      Thank you! Now you can create different websites! Congrats!

  • abhishek srivastava
    Reply

    I have tried as suggested by u, but stuck at a point! please check and suggest for possible solutions:
    I have connected pi with ethernet cable to access pi using ssh “address:10.42.0.33”
    To get IP address I have connected wifi dongle to pi and made static wlan0 ip “192.168.1.72”
    I have Binatone DT 845W ADSL2+ model where I have used virtual server to forward port ip address “192.168.1.72”. Settings saved but I cannot access the same from outside network using my pi ip address.Address works in local network. What mistake I have done ?

    • Alok N
      Reply

      Well, that wouldn’t work. Outside your network, if you need to access your Raspberry Pi, you need to access your external ip address. For that, first you forward your RPi’s ip address, port 80(which I hope you’ve done). Then to get your External/Public IP Address, you just search IP Address in Google and you can get it! After that, you can access your Raspberry Pi, using your External IP Address.

  • Decrecondiz
    Reply

    Hi, installed my php admin and added it to the apache2.conf file, went to restart the server and it fails every time I get told to look into some files but I don’t know where they are.

    • Decrecondiz
      Reply

      Can’t access the website anymore either

      • Alok N
        Reply

        HI!
        can you send your apache2.conf file…?

  • programmer123454321
    Reply

    Just a note: your website is down again.

    • Alok N
      Reply

      Yeah.. Sorry for it!… It has been changed to a different URL: naysonet.ddns.net .. n It might not be on all the time.. My parents don’t allow me to do so…! Still, worth a shot…

  • Jacob
    Reply

    Hi Alok,
    I followed your instructions and had no problems, but when I try and link a CSS document to my page, it doesn’t load on my page. If I add the code using the tags, it does show up. The CSS file is located in the same directory as the HTML file. Here is my link code:
    What am I doing wrong?

    • Jacob
      Reply

      UPDATE: I fixed it! The permissions on my CSS file made it so the html file couldn’t access it.

      • Alok N
        Reply

        good to know!

  • Sundar Rajan
    Reply

    Hi Alok,
    It was a pleasant surprise to see such an excellent article coming from a 14 year old. I wish you all the very best for a bright future.

    I just followed your instructions and got everything going without any hitch. Thanks.

    Since I have a static IP provided by my service provider, I didn’t have to use DDNS.

    Now let me come my tricky situation. Hope you can think of a way to get over the issue. My router is already configured to do the port forwarding for my CCTV system. I temporarily changed the ip address to that of RPi (in place of CCTV’s IP address) to test things out. Now, does this mean I have to settle for one of the two? Is there a way to access both my CCTV and RPi?

    Regards,
    Sundar Rajan

    • Alok
      Reply

      Hi Mr.Sundar,
      Thanks for using my DIY! About what you asked- You can use your CCTV System and your Server together.. Happy news! but it’s just that they cannot be on the same port. An HTTP Server uses port 80. If your CCTV system does not use Port 80, it’s ok…you can have the Server at Port 80. If you want your Server at the first place, you can change the port of your CCTV System.. If you want your CCTV at the first place, you can change your Server port… Please check out this link to do so

      https://docs.google.com/document/d/1u2mpIkQeZPZ1CWIb59b0iXXIgjHZIaOa70vw6vS_XEI/edit?usp=sharing

    • Jacob
      Reply

      *using the tags

      • Jacob
        Reply

        *style tags. If I add style in angle brackets it won’t show up.

  • joe
    Reply

    My router is special and only allows us to use dyndns.org as a dns service. So Im screwed for domain names

    • Alok
      Reply

      Can u give the model no. of your router??

      • ghosh
        Reply

        Same for me as well.
        Cisco DPC3848V DOCSIS 3.0 Gateway

  • Frey
    Reply

    i have problem apache2 doesnt work on my web server
    here my problem :
    [email protected]:~ $ systemctl status apache2.service
    ● apache2.service – LSB: Apache2 web server
    Loaded: loaded (/etc/init.d/apache2)
    Drop-In: /lib/systemd/system/apache2.service.d
    └─forking.conf
    Active: failed (Result: exit-code) since Thu 2016-10-20 17:00:35 WIB; 46s ago
    Process: 26343 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
    Process: 26298 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
    Process: 26400 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
    [email protected]:~ $

  • Gonza
    Reply

    Hi! Thanks for the guide! I have my RPi running a web server now.

    • Alok
      Reply

      You r welcome!!

  • Amit
    Reply

    Hi Alok,
    When i tried installing PHP i.e when i executed this command : apt-get install libapache2-mod-php5 php5 php-pear php5-xcache
    i got the following error :
    E: Package ‘libapache2-mod-php5’ has no installation candidate
    E: Package ‘php5’ has no installation candidate
    E: Unable to locate package php5-xcache
    Please HELP!!!
    Thanks

    • Alok N
      Reply

      Hi Amit,
      Can u reply which version of raspbian are you using?

      • Alok
        Reply

        U can use the command uname -a send me the whole result

  • Andrea
    Reply

    Hi

    I was wondering. Will I still be able to access the internet with my pi if my pi is not connected to the modem/ethernet?

    • Amit
      Reply

      hi Andrea,
      You will be able to access the internet if you’re Raspberry Pi is connected via Wi-Fi or else you wont

  • Jack
    Reply

    Great guide! On a related note, your website (naysopi.ddns.net) is down.

    • Alok N
      Reply

      Sorry! Actually it is… I am working on a new project. So, I have kept my server off. It will come back soon.

      • BRIAN
        Reply

        Really great Job!! Question. Are there easy to use tools that would aid in crafting the building the web page

        • Alok N
          Reply

          Check out the Google Web Designer Tool, haven’t worked in it, still please check out! https://www.google.com/webdesigner/ . If that doesn’t satisfy your needs, you can use different responsive webpage templates. Just Google them!

Leave a Comment

2 + 2 =

Start typing and press Enter to search