Posts

Showing posts with the label Subdomain

2021 Top 4 Best Upcoming Flagship Smartphones : which are the best mobile phones for you..?

Image
  Hi here are the top 8 best upcoming flagship smartphones of 2021 with high-end level features improved cameras stunning design and many other next-generation technologies will be applied that you will really enjoy also the price and the release date of the smartphones are discussed. Number four Asus Zenfone 8 Number three OnePlus 9 Number two Huawei P50 Number one Apple iPad Pro 12.9

Codeigniter subdomains sharing one common app

Image
I assume that your are using Windows-7 WAMP Apache 2.4.2 (installed in C: directory) PHP 5.4.3 CodeIgniter 2.x   Download Hi there, the first question raises I our mind is  How to add a sub-domain to be reached at: subdomain.mainsite? So, here we start to create sub-domain for localhost. Step 1: Edit the file located in C:\windows\system32\drivers\etc\hosts add the following to it 127.0.0.1 subdomain.mainsite Save File Step 2 : Edit the httpd.conf file Add the following to the bottom of the file ########################## NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "C:\wamp\www" ServerName localhost </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "C:\wamp\www\mainsite" ServerName subdomain. mainsite ErrorLog logs/subdomain_error.log </VirtualHost> ########################### Step 3: You must make sure the subdomain directory exists inside mainsite(CodeIgniter).

Create subdomain on localhost in linux

Question:   Let suppose i have a web site www.webspot.com. Now I want to create a subdomain sub.domain.com, and when I enter it in my browser, I want to go to the same web site (www.webspot.com). Answer:   Simply on terminal type sudo gedit /etc/apache2/sites-available/your-web-site file will open now make some little changes like this : ServerName webspot.com DocumentRoot /var/www/your-website/public ServerAlias sajid.webspot.com ServerAlias naveed.webspot.com ServerAlias nasir.webspot.com ServerAlias ihsan.webspot.com ServerAlias zeeshan.webspot.com Options FollowSymLinks AllowOverride All ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined   then type: gedit /etc/hosts   f ile will open now make some little changes like this: 127.0.0.1 localhost 127.0.0.1 webspot.com 127.0.0.1 sajid.webspot.com 127.0.0.1 naveed.webspot.com