I have a project c:/xampp/testadmin(laravel).I have created a virtual host for it.
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/testadmin/public"
SetEnv APPLICATION_ENV "development"
ServerName mywebsitename.com
ServerAlias mywebsitename.com
<Directory C:/xampp/htdocs/testadmin/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Actauly my mywebsitename.com
is a sub domain url. Now everything is okay and project is up.but problem is that when i hit mywebsitename.com/storage/app i got an error
Object not found!
The requested URL was not found on this server. If you entered the
URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
mywebsitename.com
Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.0
but when i hit localhost:8080/testadmin/storage/app it's working.and now my App-URL is mywebsitename.com.how can i solve this isuue?
Any help would be appreciated.
Related
I'm using XAMPP v3.2.4 and I don't know if this makes any difference but Joomla 3.9.14
In my local environment I access my Joomla site by visiting localhost/mysite. I now want to have a sub domain localhost/apps.mysite.
I've created a folder called apps and placed this in my Joomla root directory, which is C:\xampp\htdocs\mysite\apps. This folder contains a single index.html file.
I've made the following changes;
In my Windows hosts file I added the following line;
127.0.0.1 localhost/apps.mysite
In my httpd-vhosts.conf file I added;
NameVirtualHost 127.0.0.1:80
<virtualhost *:80="">
DocumentRoot "C:/xampp/htdocs/mysite/apps"
ServerName localhost/apps.mysite
ServerAlias www.apps.mysite.localhost.com
</virtualhost>
I haven't made any other changes to config files. I've restarted Apache a few times, no change.
When I visit the URL http://localhost/apps.mysite I see the following error;
Object not found! The requested URL was not found on this server. If
you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.9
What do I need to change in order to access my subdomain at http://localhost/apps.mysite
First host file does not handle folders, just map IP addresses to hostname.
Host file should be
127.0.0.1 localhost apps.mysite
or
127.0.0.1 localhost
127.0.0.1 apps.mysite
I prefer the second method because I can comment the line..
Second Your virtual host ServerName localhost/apps.mysite does not work with sub folders.
Valid Servername values can be: domain.com, example.com, site1.example.com, user.site1.example.com and son on.
A virtual host example to map the apps.mysite should be:
<VirtualHost *:80>
ServerName apps.mysite
ServerAlias www.apps.mysite
## Vhost Document Root
DocumentRoot "C:/xampp/htdocs/mysite/apps"
</VirtualHost>
This is a minimal example, no logs defined or directory specific rules. With this configuration you will be able to reach your site by using http://apps.mysite only on your computer because the host file is resolving the "apps.mysite" to your localhost (127.0.0.1).
What do I need to change in order to access my subdomain at http://localhost/apps.mysite
http://localhost/apps.mysite is not a sub-domain is a domain localhost with a folder apps.mysite, a valid subdomain is subDomain.domain.com.
.com is a top level domain
domain.com is a domain name
subDomain.domain.com is a subdomain of domain.com
Hope it helps.
Start by creating a VirtualHost for localhost in case you want to use that for a bit of fiddling
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs"/>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
## then add main site
<VirtualHost *:80>
ServerName mysite.local
ServerAlias www.mysite.local
DocumentRoot "C:/xampp/htdocs/mysite/"
<Directory "C:/xampp/htdocs/mysite/"/>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
## then add the sub domain
<VirtualHost *:80>
ServerName aps.mysite.local
ServerAlias www.aps.mysite.local
DocumentRoot "C:/xampp/htdocs/mysiteapps/"
<Directory "C:/xampp/htdocs/mysiteapps/"/>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
You will need to add these 2 sites to your C:\windows\system32\drivers\etc\hosts file like this
127.0.0.1 mysite.local aps.mysite.local
::1 mysite.local aps.mysite.local
For the change to the HOSTS file you will either need to reboot or refresh the DNS Cache like this from a command window
>ipconfig /flushdns
I have created a virtualhost in the /opt/lampp/etc/extra/httpd-vhosts.conf which is following-
<VirtualHost *:80>
DocumentRoot "/var/www/current"
ServerName gjtest.no
<Directory "/var/www/current" >
AllowOverride All
Allow from all
Require all granted
</Directory>
</VirtualHost>
and added gjtest.no to /etc/hosts file like 127.0.0.1 gjtest.no
But whenever I tried the gjtest.no URL in the browser I get the following error
Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.25 (Unix) OpenSSL/1.0.2j PHP/5.6.30
mod_perl/2.0.8-dev Perl/v5.16.3**
The url is automatically changed to localhost
I am totally confused with my problem. It is not the new one but I can not find the right combination of words and tags for my config - files, because some of the solutions from the same questions here are not working.
I am trying to open the site, which is locally hosted by xampp server from my phone.
The address I am using is : ip:8080/blog.dev:8080 and I am getting 403 - error.
My conf - files:
httpd-vhosts.conf
<VirtualHost *:8080>
DocumentRoot "D:/PHP/xampp/htdocs/blog/public"
ServerName blog.dev
<Directory "D:/PHP/xampp/htdocs/blog/public">
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
httpd.conf
DocumentRoot "D:/PHP/XAMPP/htdocs"
<Directory "D:/PHP/XAMPP/htdocs">
Order allow,deny
Allow from all
Require all granted
</Directory>
I tried to add "Options Indexes FollowSymLinks"but that's not help
Following your logs and the provided link, I'd say that the second port number is "too much".
Try access your website through http://blog.dev:8080/.
Hope it helps.
EDIT
If the ip is 192.168.1.102, you have to replace the
127.0.0.1 blog.dev
with that ip in your host file :
192.168.1.102 blog.dev
And then, access it through http://blog.dev/.
looking for solutions for a small challenge
i have my local network (router)
i have debian server on first machine where i have installed a symfony in /var/www/my-symf-app
i changed /etc/site-available
and
/etc/hosts
for my new web site
when i'm trying to reach in a web browser my-symf-app from my debian machine
--> and it works fine
but when I'm using targeting my server from another PC with my ip http://192.168.0.47/coach.dev
i have a situation
and i receive a 404 not found
but when I'm targeting my debian server just with http://192.168.0.47
it works fine, it shows me a index.htm Works find
i have commented code in config.php
for if server something throw error forbidden
could you pls explain me what I'm doing wrong and how can i fix it?
my /etc//sites-available/coach
<VirtualHost *:80>
ServerAdmin webmaster#localhost
ServerName coach.dev
ServerAlias www.coach.dev
DocumentRoot /var/www/coach/web
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/coach/web>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
my /etc/hosts
127.0.0.1 coach.dev
Add on the 2nd computer ip and domainname to hosts.
I mean add ip adress of the server and his domain to host on second computer it should work.
I am new to squirrelmail. I am trying to configure a mail server on a linux machine which I installed apache, php, and dovecot.
I installed squirrelmail from the source code in /var/www/webmail/
I configured a virtual host:
<VirtualHost *:80>
ServerName webmail.my.domain.com
ServerAlias webmail
DocumentRoot /var/www/webmail
<Directory "/var/www/webmail">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I set the Domain under "Server Settings" in the config file to webmail.my.domain.com.
when I try to do a configtest.php in browser: webmail.my.domain.com/src/configtest.php
I get this error: 404 Not Found
The requested URL /src/configtest.php was not found on this server.
I am not sure how to get past this error. Any help would be appreciated.
Thanks.