Jump to content

Web Development local server set up and all that.

mrchow19910319
Go to solution Solved by colonel_mortis,
9 minutes ago, mrchow19910319 said:

one more question, when you said different websites, 

do you mean : 

 

a) completely different website.


 

OR 

 

b) one site that contains different pages. 

 

 

a - for example, if this site was using apache (we actually use nginx), and the prod and beta sites were on the same server, we would have a virtual host for linustechtips.com and one for beta.linustechtips.com, but all the pages within linustechtips.com are handled by one virtual host. In your server configuration, you will have set a base path, probably /var/www/html, so to create multiple pages you just need to add multiple different files within that directory. A very basic example would be that your iamthebest.com/ page is at /var/www/html/index.html (the index.html or .php file is the default if no file is specified), then iamthebest.com/about/ is at /var/www/html/about/index.html (or iamthebest.com/about.html at /var/www/html/about.html), etc.

12 minutes ago, mrchow19910319 said:

what about step 3? initial ubuntu server setup?? 

what about that ? Do i only need to do that in the real server environment??? 

That step is only needed on a real server, and you would need to do that before you can do step 1 (it is listed as a prerequisite for it).

Recently I stumbled upon these articles and wanna to set up my own local server environment so that I can get a feel of what web development is all about.

 

  1. set up lamp stack (done) https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
  2. install phpMyAdmin https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04
  3. initial server setup with ubuntu https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04
  4. how to set up virtual host  https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04
  5. secure apache with lets encrypt  https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04 

 

Right now I just finished step one. I set up lamp stack on my local machine. (my OS is ubuntu 18.04)

But what is the next step??? If I just wanna develop my own website, do I need do anything else from above? 

Or I should just starting to write website right now and learn how to do the rest when I migrate my site to real server ? 

 

 

I am confused.  

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, mrchow19910319 said:

Recently I stumbled upon these articles and wanna to set up my own local server environment so that I can get a feel of what web development is all about.

 

  1. set up lamp stack (done) https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
  2. install phpMyAdmin https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04
  3. initial server setup with ubuntu https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04
  4. how to set up virtual host  https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04
  5. secure apache with lets encrypt  https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04 

 

Right now I just finished step one. I set up lamp stack on my local machine. (my OS is ubuntu 18.04)

But what is the next step??? If I just wanna develop my own website, do I need do anything else from above? 

Or I should just starting to write website right now and learn how to do the rest when I migrate my site to real server ? 

 

 

I am confused.  

You can also just get XAMPP for windows and use the htdocs directory for your project, that'll automatically pop up when you enter the IP address of your PC on another device on your network 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, NoccoAddict said:

You can also just get XAMPP for windows and use the htdocs directory for your project, that'll automatically pop up when you enter the IP address of your PC on another device on your network 

yeah thanks but, I am kind of confused that what should I do next? 

do I need to enable SSL on my local server? as a practice, cos when I migrate my site to the server I am gonna do it anyway? 

 

do I install phpMyAdmin next? 

 

what about virtual server?? what does that do??

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, mrchow19910319 said:

yeah thanks but, I am kind of confused that what should I do next? 

do I need to enable SSL on my local server? as a practice, cos when I migrate my site to the server I am gonna do it anyway? 

 

do I install phpMyAdmin next? 

 

what about virtual server?? what does that do??

Yes you install phpmyadim next like the guide says I guess

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, mrchow19910319 said:

yeah thanks but, I am kind of confused that what should I do next? 

do I need to enable SSL on my local server? as a practice, cos when I migrate my site to the server I am gonna do it anyway? 

 

do I install phpMyAdmin next? 

 

what about virtual server?? what does that do??

Virtual servers are only needed, if you, you know, plan to run multiple websites on your server. phpMyAdmin isn't necessary, you can do everything from the command-line just as well, so it is up to you whether you want it or not. In general, though, it's a good idea to install as little extra stuff on a server as possible, because any extra stuff has a chance of introducing a vulnerability.

 

As for SSL: yes, it's a good idea to learn how to do that, though it's not exactly difficult with Let's Encrypt. Later on when you have all working and all, you can tighten up your SSL-settings with https://mozilla.github.io/server-side-tls/ssl-config-generator/ but that's not something you need to worry about now.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, WereCatf said:

Virtual servers are only needed, if you, you know, plan to run multiple websites on your server. phpMyAdmin isn't necessary, you can do everything from the command-line just as well, so it is up to you whether you want it or not. In general, though, it's a good idea to install as little extra stuff on a server as possible, because any extra stuff has a chance of introducing a vulnerability.

 

As for SSL: yes, it's a good idea to learn how to do that, though it's not exactly difficult with Let's Encrypt. Later on when you have all working and all, you can tighten up your SSL-settings with https://mozilla.github.io/server-side-tls/ssl-config-generator/ but that's not something you need to worry about now.

thank you ! 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, mrchow19910319 said:

yeah thanks but, I am kind of confused that what should I do next? 

do I need to enable SSL on my local server? as a practice, cos when I migrate my site to the server I am gonna do it anyway? 

You can't (without creating root certificates or adding security exceptions) enable TLS (=the up to date name for SSL) on a local server, because you have to prove that you own the domain name that you are accessing, but you don't own localhost (which is most likely the domain name that you are currently using). When you switch to a world accessible server, you will probably use a (free) service called LetsEncrypt to obtain the certificate, but you can't use that locally.

9 minutes ago, mrchow19910319 said:

do I install phpMyAdmin next? 

If you're going to be using databases a reasonable amount, I would recommend phpMyAdmin for you, because if you don't know all of the mysql syntax it can make it much easier to manage the database. You will have to make the same changes on every server that you want to use your site on though.

9 minutes ago, mrchow19910319 said:

what about virtual server?? what does that do??

A virtual server is a way of running multiple different websites on the same server, so that each website can have its own files, SSL/TLS certificates, etc.

 

As for the next step, if your LAMP stack is set up correctly I would suggest starting to build your website (or learning web development skills (that is, HTML/CSS/JS, PHP and SQL), if you haven't already).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, colonel_mortis said:

 

A virtual server is a way of running multiple different websites on the same server, so that each website can have its own files, SSL/TLS certificates, etc.

one more question, when you said different websites, 

do you mean : 

 

a) completely different website.


 

Quote

 

I am gonna create a blog called: myblog.com

then I am gonna make another completely different site that is called : twitchtvclone.com 


 

OR 

 

b) one site that contains different pages. 

 

Quote

I created my personal site: iamthebest.com, but on that site I have multiple pages waiting for me to write, cos I need to have a home page, a about me page, a personal portfolio page, then we need to store these different pages in to different folder

 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, colonel_mortis said:

 

what about step 3? initial ubuntu server setup?? 

what about that ? Do i only need to do that in the real server environment??? 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, mrchow19910319 said:

one more question, when you said different websites, 

do you mean : 

 

a) completely different website.


 

OR 

 

b) one site that contains different pages. 

 

 

a - for example, if this site was using apache (we actually use nginx), and the prod and beta sites were on the same server, we would have a virtual host for linustechtips.com and one for beta.linustechtips.com, but all the pages within linustechtips.com are handled by one virtual host. In your server configuration, you will have set a base path, probably /var/www/html, so to create multiple pages you just need to add multiple different files within that directory. A very basic example would be that your iamthebest.com/ page is at /var/www/html/index.html (the index.html or .php file is the default if no file is specified), then iamthebest.com/about/ is at /var/www/html/about/index.html (or iamthebest.com/about.html at /var/www/html/about.html), etc.

12 minutes ago, mrchow19910319 said:

what about step 3? initial ubuntu server setup?? 

what about that ? Do i only need to do that in the real server environment??? 

That step is only needed on a real server, and you would need to do that before you can do step 1 (it is listed as a prerequisite for it).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, colonel_mortis said:

 

thanks for the help!!!!!

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, colonel_mortis said:

 

also are you one of the backend guys on LTT forum??? 

when can the edit section support markdown??? LOL . xD 

 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, mrchow19910319 said:

also are you one of the backend guys on LTT forum??? 

when can the edit section support markdown??? LOL . xD 

 

I don't write the forum software itself, but I deal with all the ltt-specific stuff. BBCode is supported (ish), but the forum software devs made it very clear that this rich text editor is designed to replace the need for any alternative input formats, so BBCode is deprecated and the chances of them adding support for something like markdown are effectively zero (and, to be honest, the chances of them making any changes based on our feedback are pretty low in my experience).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, colonel_mortis said:

I don't write the forum software itself, but I deal with all the ltt-specific stuff. BBCode is supported (ish), but the forum software devs made it very clear that this rich text editor is designed to replace the need for any alternative input formats, so BBCode is deprecated and the chances of them adding support for something like markdown are effectively zero (and, to be honest, the chances of them making any changes based on our feedback are pretty low in my experience).

god damn... 

is this forum built on some open source framework or something?

I have seen other forum basically using the same format and just change its main color. 

 

https://www.alfredforum.com/

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, mrchow19910319 said:

god damn... 

is this forum built on some open source framework or something?

I have seen other forum basically using the same format and just change its main color. 

 

https://www.alfredforum.com/

It's a commercial forum software - https://www.invisioncommunity.com/

(to avoid adding a bunch of off topic posts here though, if you'd like to continue the discussion please either start a new topic or PM me).

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Dat Guy said:

The only web development stack you'll ever need is BCHS.

https://learnbchs.org/

In your ideal web app, what do you write the front end in? Not the front end server, but the actual front end. I can see C being used to serve pages, but can you show me an example where C is used to write complex and elegant front ends? Could you write a reactive front end? Also, I would avoid suggesting this tech stack unless people are doing their own thing. In terms of hirability, it's pretty silly to learn C if you want to get a modern web dev job. EVEN IF the bchs stack were as great as it claims to be, that's simply not where the jobs are. If you went to an interview for a web developer position and they asked "how familiar are you with react, node, webpack, etc.", and you said "oh I just write everything in C", they would not go "Oh that's very impressive how cool!" they would laugh you out of the door. 

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

It's pretty silly to prefer a web dev job to a C job. You really don't want to be around web designers... 

 

I write front-ends in HTML and CSS because that's what browsers speak. I don't understand the question. No, I don't use "React" or something - because why? 

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Dat Guy said:

It's pretty silly to prefer a web dev job to a C job. You really don't want to be around web designers... 

 

I write front-ends in HTML and CSS because that's what browsers speak. I don't understand the question. No, I don't use "React" or something - because why? 

Why would l use C instead of industry standard languages and frameworks? I'm not saying it's impossible to make a website without JS, i'm just wondering why you'd want to. what's the advantage here? Save a few ms of execution time that the user won't even notice?

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

C is an industry standard language.

1 minute ago, reniat said:

what's the advantage here?

Less impact on your visitors' security, faster loading times.

 

(But you can, of course, spill some JavaScript with C.)

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

Relevant

toggl-if-the-world-was-created-by-a-programmer.thumb.jpg.8513e40ac5598243acfc1f4ae518a84a.jpg

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

while I love that comic, for the sake of discussion I do want to point out that there's a middle ground between bloating your web app with libraries and writing in pure C. 

 

I actually dislike web development and would rather write C++ forever, but i'm also very much in the "use the right tool for the job, and do the job well" camp. E.g., don't force frameworks into your project when others would fit better, and write with solid design principles no matter what your tech stack is.

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 18/08/2018 at 3:31 PM, WereCatf said:

Virtual servers are only needed, if you, you know, plan to run multiple websites on your server.

In which case you would probably be better off with docker containers than running full os VMs.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, vorticalbox said:

In which case you would probably be better off with docker containers than running full os VMs.

The OP wasn't talking about virtual-machines, he was talking about the Apache-feature where you can define multiple websites on multiple domains to be served from a single Apache-instance, each with their own SSL-certificates and all.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×