Well, I have a ubuntu server installed on virtual box running on windows 7.
The virtual machine has 2 adapters set, adapter 1 is host-only meanwhile adapter 2 is NAT. In the NAT adapter, I set up the forwarding port to open the port to outside of the network. So whenever the ip address of the host is typed on browser it will be forwarded to guest ip (Ubuntu server which host a web app). I have a codeigniter folder under /var/www/ and I changed the DocumentRoot in /etc/apache2/sites-available/000-default.conf from /var/www/html to /var/www/codeigniter
Before changing the config file I can access the starting page index.php in /var/www/html from host's browser however when I changed the DocumentRoot to /var/www/codeigniter and typed the ip on host's browser it said the page was not found on the server when it's clearly there.
Note that : the codeigniter origin was from host pc (Windows 7) and I moved to Ubuntu. When downloading the new codeigniter files from ellislab's website it works fine. but it doesnt work with the old codeigniter file from windows
how can I solve this problem ?
Do I need to do something with the virtual host on windows ?
Related
Hello I have installed xampp/lampp on windows and am trying to open website in local host using:
http://localhost/htdocs/my-first-project/index.php
I have also tried
http://localhost/my-first-project/index.php
But it always shows following error:
Not Found The requested URL was not found on this server.
Apache/2.4.41 (Ubuntu) Server at localhost Port 80
But my local host page and phpmyAdmin is running without any problem
I also want to mention that I have set my Apache server port to 8080.
Thank you in advance
Have you already tried to place your index.php in the DocumentRoot Folder and access it from there?
I am trying to setup LEMP (Linux, Nginx, MySQL, PHP) stack on my PC to use with Wordpress.
I follow the instructions on this website. I see that the folder of wordpress in www folder was successfully extracted.
I can also verify that Nginx is running. However, I don't know how to get the wordpress index.php page on the browser.
On windows, I simply go to the browser and type localhost/webprojectfoldername or 127.0.0.1/webprojectfoldername
However, when I try to access the index.php of wordpress via localhost, I get the Apache page.
I would like to use Nginx as server but not Apache. I guess at this point, I don't know what servername or ipaddress to put on the browser to get to Nginx's page or Wordpress's index.php
I don't know how to identify the servername that was setup. On Windows, I simply use localhost or 127.0.0.1.
Any thoughts on how I identify it on Ubuntu?
I'd appreciate any help.
Thank you.
*** EDIT (Added Screenshot of Nginx configuration) ****
Either:
nginx is listening on a different port
By default, HTTP works over port 80, but when you connect to that port you are reaching Apache.
You need to find the port nginx is listening on (from the article you link to: listen 80 default_server; shows 80 but lets say it was 81) and connect to that instead: http://localhost:81/`
nginx and apache are trying to listen on the same port and apache won
You need to turn off Apache (and possibly restart nginx).
I have xampp installed on my PC. I can access xampp dashboard and PHPmyadmin by entering 192.168.x.x on another computer over same network. But when I type in 192.168.x.x/folder_name/ where folder_name is folder in htdocs it redirects to localhost/foder_name hence showing object not found error.
What is reason that it is redirecting to my ip to localhost on that computer?
check your firewall for any input with incoming on port 80 ( or for the test turn off firewall )
in xampp look for http.conf (configuraton file for apache)
look for something like that :
order deny,allow
deny from all
allow from 127.0.0.1
remove "deny from all" and reload apache
I have been getting this error message on my Windows 10 machine:
"Not Found
The requested URL /phpMyAdmin was not found on this server."
Apparently,
I finally had enough of my Wampserver. Uninstalled it. And installed Apache, PHP, and MySQL as separate components.
Everything worked fine(phpMyAdmin incuded), Until I created virtual hosts on one of my other drives. I used the usual route, by uncommenting the httpd-vhosts.conf include in the Apache httpd.conf file- Then, added my virtual hosts to the httpd-vhosts.conf file.
I also included this block of code, along with the other virtual hosts:
DocumentRoot "C:\Apache\htdocs"
ServerName localhost
The phpMyAdmin folder is in the htdocs folder. However, my websites are on another drive. They are working fine, though. Its just the phpMyAdmin pagr that is not working.
However, almost every response seems to base itself on some 'stack' bundle, such as Wamp, or Xammp. I am not using any of these anymore.
I want to run a localhost php website from some other system. I was able to run the website through the subfolder link as http://192.168.1.102/website. But I want it to run as the main site http://website.
Is there any way we can achieve this.
I have tried adding following in hosts file but didn't work.
host:
http://192.168.1.102/website website
I also tried to do following:
host:
192.168.1.102 website
httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot e:/wamp/www/website/
ServerName website
</VirtualHost>
Here the DocumentRoot path is the path on other pc.
In the system in which you are hosting your website ( I mean the one you are accessing via LAN ) you need to have below host entry
127.0.0.1 localhost
127.0.0.1 website
and in the system from where you are accessing this remote system need to have below host entry
192.168.1.102 website
192.168.1.102 is the ip address of the machine you are accessing , please change it accordingly
Also If you have problems in setting Up VHOST in WAMP you can verify your way with the below link it worked for me I often use to follow this link
Setting up WAMP server in windows along with virtual HOST
You need to edit the apache config for wamp to point its default root to your folder (not the vhosts but the main file) also you'll need to put wamp into online mode so it'll listen on the external interface not just localhost but I believe this is just a * in the config anyway to listen to all not just 127.0.0.1
In the /etc/hosts add an entry like this:
127.0.0.1 www.localhost
192.168.1.102 website