I've setted up an Ubuntu 14.04 with php5, Apache2, mysql / mysql-php.
Now I am tring to visit mydomain.com/admin but its response the following error
The requested URL /admin was not found on this server.
Here is my mydomain.com.conf file
<VirtualHost *:80>
<Directory /var/www/mydomain>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot /var/www/mydomain
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
mod_rewrite is already enabled
You can't access the domain because you haven't properly configured a live domain. Go to http://localhost:80/admin to access your information. I would try setting the server name equal to your public IP address and set the server alias equal to localhost. Then you'll be able to access the server from over the web by entering your public IP address into the URL of your HTTP client.
Related
after installing paid ssl certification the web site sometime give some visitors this wired error
i'm using laravel 6 the host is aws light sail Ubuntu 18
my laravel conifg in Apache2
<VirtualHost *:80>
Redirect permanent "/" https://www.sitename.com/
</virtualHost>
<VirtualHost *:443>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/star-flight/public
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/example.key
SSLCertificateChainFile /etc/apache2/ssl/chain.crt
<Directory /var/www/html/star-flight/public >
AllowOverride All
Allow from all
Options Indexes FollowSymLinks MultiViews
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
That error message is a DNS error which indicates that the IP address for the domain cannot be found. It is not related to SSL, as browser has not connected to the site to begin SSL negotiation.
If the site opens fine for some and not others, then it could be a DNS propagation issue.
Review your DNS settings. You also can check DNS propagation at https://dnschecker.org/
I've moved my site to be hosted with Digital Ocean. I've set the A records to point to the severs IP address. The www lands on the site as expected but the non www 404s.
Not Found
The requested URL / was not found on this server.
Apache/2.4.18 (Ubuntu) Server at mydomainhere.com Port 80
Apache config looks like:
<VirtualHost *:80>
ServerName mydomainhere.com
DocumentRoot /var/www/html/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/laravel>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Any ideas? Cheers!
I recently install Laravel in my laptop. I have no problem when i install it. The problem now is when i'm trying to use punya.by instead of localhost:84/laravel/public.
I install my XAMPP in Disk : D
<VirtualHost punya.by:84>
DocumentRoot "D:/xampp/htdocs/laravel/public"
ErrorLog "logs/dummy-host.example.com-error.log"
ServerAdmin punya.by
<Directory "D:/xampp/htdocs/laravel">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
and here is my Hosts
127.0.0.1 punya.by
there is no problem when i access it with localhost:84/laravel/public but when i access it with punya.by . I get this
Not Found
HTTP Error 404. The requested resource is not found.
So how to fix this ? thanks in advance.
You need to access it by punya.by:84
Since it's listening on port 84, doesn't matter if you try to access it via IP or domain.
EDIT:
You need to define the vhost like this:
<VirtualHost 127.0.0.1:84>
DocumentRoot "D:/xampp/htdocs/laravel/public"
ServerName punya.by
<Directory "D:/xampp/htdocs/laravel/public">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
Deny from all
Require all granted
</Directory>
</VirtualHost>
Basically, the virtual host listens to an IP:Port combination and only inside the declaration do you define the domain that will be matched.
I Want to create a virtual host in my XAMPP with 8001 port number. And this should be accessible via my private network.
For Example: 192.168.1.2:8001
How can I do that?
Here is my Vhost code
<VirtualHost *:8001>
ServerName 192.168.1.2
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/dir"
<Directory "/Applications/XAMPP/xamppfiles/htdocs/dir">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/mysite.local-error_log"
</VirtualHost>
I have just added Listen 192.168.1.2:8001 to my httpd.conf file. And Its working..
Could you please help me to access XAMPP localhost sites from a mobile device (either from home network or from internet)
I am using multiple virtual hosts to access all sites using a short link for each. Please see the configuration of virtual hosts below:
<VirtualHost *:80>
ServerName mysite
ServerAlias mysite
DocumentRoot "F:/Drive/Dev/mysite"
<Directory "F:/Drive/Dev/mysite">
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName mysite2
ServerAlias mysite2
DocumentRoot "F:/Drive/Dev/mysite2"
<Directory "F:/Drive/Dev/mysite2">
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
Require all granted
</Directory>
</VirtualHost>
and the host file:
127.0.0.1 mysite
127.0.0.1 mysite2
I have tried several suggestion found here, but non of them helped...
Thanks in advance.
ngrok creates a secure public URL (https://yourapp.ngrok.io) to a local webserver on your machine
test mobile apps against a development backend running on your machine.
https://ngrok.com/